Hi, I am a new SAS user. I am currently trying to replicate a paper using a mixed effect model to analyze the effect of genetic risk on cognitive functions using a longitudinal data set. In the article I would like to replicate, the authors state " Genetic associations with cognitive function or AD-related biomarkers were tested using linear mixed-effects regression models implemented in the SAS MIXED procedure to account for the within-family and within-subject (due to repeated measures) correlations while allowing for missing data[28]. Each mixed-effects model included random intercepts for both family and participant. A random effect for time (age centered) was included when its inclusion led to a better model fit. " I know how to account for within-subject correlation and give random intercept to each participant using the proc mixed procedure. Still, I don't know how to account for within-subject and within-family correlation at the same time while allowing the model to include random intercepts for both family and participant. I am currently trying the following code, but I don't know if this code is consistent with what has been described by the method description I showed above. Also, running this code is too time-consuming, and I don't know if there are some other efficient methods I can use to save time. In this code, DBID is the unique individual ID; FAMILY is the unique family ID, VISNO is numeric time, TIME is character time. Thank you in advance if you can help me address this problem. PROC MIXED DATA = PHENOTYPE_PGS_STD;
CLASS DBID FAMILY TIME;
MODEL Z_STAY_RCL = PGS_APP_DOLD AGEATVISIT GENDER VISNO / CHISQ S DDFM = BW;
RANDOM INTERCEPT VISNO FAMILY / TYPE = UN SUBJECT = FAMILY G;
REPEATED TIME / TYPE = UN SUBJECT = DBID R;
RUN;
... View more