Hello,
I am trying to convert Proc Glimmix command in SAS to Stata.
Briefly, I am estimating an Age-Period-Cohort model for a binary outcome, OBESE, with age as a fixed effect and period and cohort effects as random effects in the model. The data I use is repeated cross-sectional, not longitudinal, and it is appropriate when the APC model is estimated.
The SAS syntax below is an example in the APC website by Yang C. Yang. The SAS code works for my own analysis, but for some reason, I need to write the same code in Stata.
: http://yangclaireyang.web.unc.edu/ag...-applications/
Here is the SAS code.
Since the outcome is binary, I think I need to use melogit in Stata, but I might be wrong. Please help and let me know if anything is not clear. Thank you.
I am trying to convert Proc Glimmix command in SAS to Stata.
Briefly, I am estimating an Age-Period-Cohort model for a binary outcome, OBESE, with age as a fixed effect and period and cohort effects as random effects in the model. The data I use is repeated cross-sectional, not longitudinal, and it is appropriate when the APC model is estimated.
The SAS syntax below is an example in the APC website by Yang C. Yang. The SAS code works for my own analysis, but for some reason, I need to write the same code in Stata.
: http://yangclaireyang.web.unc.edu/ag...-applications/
Here is the SAS code.
Code:
proc glimmix data=NHANES_Obesity maxopt=25000; class PERIOD COHORT; model OBESE(event='1') = AGE_C AGE_C2 /solution CL dist=binary; random PERIOD COHORT / solution; covtest GLM / WALD; NLOPTIONS TECHNIQUE=NRRIDG; title "Table 7.4: HAPC-CCREM of Obesity Trends, NHANES 1971-2008"; run;
Comment