I have the following loop and am trying to export the beta coefficients and p values for each variable into a csv file. I have tried searching various forums and cannot get anything that works. I realize I need to store the information in a matrix and then export and am not sure where my problem is.
My code (simplified) is as follows:
foreach var of varlist metabolite1 metabolite2 metabolite3... {
mixed `var' diet sex age baseline || id:
}
I would like 3 columns in a csv file that include: metabolites, beta coefficients and p values
What do I need to add to my basic code to achieve that?
Thanks in advance.
Sandi
My code (simplified) is as follows:
foreach var of varlist metabolite1 metabolite2 metabolite3... {
mixed `var' diet sex age baseline || id:
}
I would like 3 columns in a csv file that include: metabolites, beta coefficients and p values
What do I need to add to my basic code to achieve that?
Thanks in advance.
Sandi
Comment