Programming the statistical procedures from SAS

Is Proc Mixed the correct procedure to determine individual change over time in a multilevel model?

Reply
Occasional Contributor
Posts: 9

Is Proc Mixed the correct procedure to determine individual change over time in a multilevel model?

I am trying to determine whether there is within person change in marijuana use over time in a multilevel model with repeated measures (days nested within people). 

The variables I have are:

marijuana - mj use per day

id - person id

studyday - 1-7 days

time01 - study day as 0 1 with even increments in between

Will this proc mixed code answer that question?

proc mixed data = mjuse covtest noitprint;

  class id studyday;

  model marijuana = time01 / solution cl outp = intp outpm = intpm  ;

  random intercept time01/ subject = id type = un g s gcorr;

  repeated /subject=id type = ar(1);

run;

Respected Advisor
Posts: 2,655

Re: Is Proc Mixed the correct procedure to determine individual change over time in a multilevel model?

Why not:

proc mixed data = mjuse covtest noitprint;

  class id studyday;

  model marijuana = studyday / solution cl outp = intp outpm = intpm  ;

  repeated studyday /subject=id type = ar(1);

random intercept/subject=id;

run;

I guess I don't understand the coding for time01, so I automatically revert to fitting studyday.

This all assumes that marijuana is a continuous variable, and that everything has NID (0, sigma**2) errors.  If your response variable is something different, or has a large skew, you may need to consider a generalized mixed model.

Steve Denham

Ask a Question
Discussion stats
  • 1 reply
  • 163 views
  • 0 likes
  • 2 in conversation