Hello all, I'm new to using SAS and has been struggling to verify if my code is doing exactly what I would like to assess.
I'm doing modeling for the effects of surgical intervention on certain brain metabolites
These are the variables
periop - reading taken around surgical time (one per subject)
age - age of the subject (patient age has high correlation with metabolite measurement)
id - each subject has a unique id
met - metabolite (dependent variable) - there are potentially two time points where each subject was measured, before surgery and after surgery. Unfortunately, some of the subjects only received one metabolite measurement, and are not consistent when they received them. About 50% of subjects received both time points, 30% pre surgery, 20% post surgery. I've already run analysis using only pre or post, but would like to combine the two just to see how the overall correlation between periop vs met.
prepost - this variable indicates whether the metabolite measurement was before or after surgery.
So a variance-covariance matrix is needed between PrePost and ID
For this I'm using a mixed effect model and this is my code:
PROC GLIMMIX ORDER = dataset;
CLASS id;
MODEL met = age periop prepost / s;
random prepost / subject = id;
run;
Thank you in advance for your help
-V
This is my alternate code:
PROC GLIMMIX DATA=dataset METHOD=laplace;
CLASS prepost age periop id;
MODEL met = prepost age periop prepost*periop age*periop / solution;
RANDOM periop / SUBJECT = id(prepost age) TYPE = chol;
COVTEST DIAGR;
RUN;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.