BookmarkSubscribeRSS Feed
vinkl
Calcite | Level 5

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

 

 

 

 

 

1 REPLY 1
vinkl
Calcite | Level 5

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;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 725 views
  • 0 likes
  • 1 in conversation