BookmarkSubscribeRSS Feed
SophieD
Calcite | Level 5

Hi all,

SAS is completely new for me, and I would like to get intercepts and slopes for each participant on four repeated measures of depression. Time intervals vary among participants. Here is the program I use:

proc mixed data=Depres covtest noclprint method=ml;

class SubjID;

model ??/ solution ddfm = SATTERTHWAITE;

random intercept time/subject=SubjID type=vc;

run;


I don't know how to define my model. (At level 1(time), depression is equal to intercept,slope (time) and error).


Moreover, in the dataset I use, should I have one participant per line and 4 different columns for the different measures of depression, or should I have only one column for depression and 4 lines per participant?


Does anyone can help? That would be so great!


Thanks in advance

2 REPLIES 2
pronabesh
Fluorite | Level 6

What is your outcome and predictor?

I presume depression is the outcome and time the predictor.

If you are using proc mixed with random effects, you will need to structure your data as person-time (i.e., 4 observations for each participant).

Your model will look like this:

proc mixed data=Depres covtest noclprint method=ml;

     class subjID time;

     model depression=time/ solution ddfm=SATTERTHWAITE;

     random residual time/subject=subjID type=vc;

     lsmeans time;

run;

SophieD
Calcite | Level 5

Thanks a lot!

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1310 views
  • 0 likes
  • 2 in conversation