Hi,
I am currently working on my thesis, and I am having trouble deciding how to run my linear mixed models mostly because the primary exposure variables and covariates are not from the same time point as my outcome variables. Additionally my data is currently in the wide format (one observation per subject, with variables from different time points being different variables rather than repeat measures). A little bit of info on my project/analysis plan:
Analysis 1: Meddiet Score (averaged from 3 time points: year 0, 7, 20) and brain MRI measures at 25 and 30 years of follow up. Confounding variables will be averaged from years 0, 7, and 20.
Analysis 2: The MedDiet scores at each individual time point (years 0, 7, and 20 analyzed separately) will in relation to brain structures, adjusting for covariates (also from each separate time point).
I am working with about 7 brain measures, so i'll have several outcome variables. Additionally, not all participants have MRI data at both years 25 and 30, hence why I chose proc mixed since it can accommodate this issue. I know the code should look something like this for the outcome variables, but i know this won't work since the times don't line up with the covariates. Please let me know if you have any suggestions! Thank you so much in advance!
data mri2;
set mri;
wm=whimatter25 time=25 output;
wm=whimatter30 time= 30 output;
gm= greymatter25 time=30 output;
gm=greymatter30 time=30 output;
h=hippocampus25 time=25 output;
h=hippocampus30 time=30 output;
run;
proc mixed data=mri2;
class meddiet covariates;
model wm= meddiet time covariates meddiet*time/s rcorr;
repeated /type=un sub=id;
run
... View more