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!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 1741 views
  • 0 likes
  • 2 in conversation