01-12-2016 04:01 PM
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;
MODEL met = age periop prepost / s;
random prepost / subject = id;
Thank you in advance for your help
01-12-2016 04:48 PM
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;