Programming the statistical procedures from SAS

new SAS user needs help!

New Contributor
Posts: 2

new SAS user needs help!

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;


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

Posts: 58

Re: new SAS user needs help!

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;


New Contributor
Posts: 2

Re: new SAS user needs help!

Thanks a lot!

Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation