Programming the statistical procedures from SAS

Proc glimmix with ordinal outcomes and repeated measures

Reply
New Contributor
Posts: 4

Proc glimmix with ordinal outcomes and repeated measures

I am trying to work out how to correctly set up the random statement in proc glimmix for my data.

I have an ordinal outcome (grade) that is repeated over time (weeks)

There are two random effects (student, supervisor)

There are a few different fixed effects, some categorical (eg worktype, location) and some are scale (eg: grade-point average)

    

Because the data are multinomial, I can’t model the repeated effects on the R-side and I am wondering how to do it on the G-side correctly. Can this be done?

This is the code I have been working on.

proc glimmix data= mydata method=laplace;

      class student supervisor worktype location week;

      model grade = worktype location week GPA /link=cumlogit dist=multinomial ;

      random intercept week/subject=student;

      random supervisor;

run;

I am wondering how it affects things if I change the random statement to include a type option (for example ARH(1)).

      random intercept week/subject=student type=ARH(1) ;

If I do this will I then be modelling a repeated covariance structure through the type option?

Any ideas appreciated.

Respected Advisor
Posts: 2,655

Re: Proc glimmix with ordinal outcomes and repeated measures

I love answering questions like this.  You have everything in place for the design you specified.  I would be a little concerned about forcing an autoregressive structure of any sort on multinomial data (oh, not enough to stop me from doing it, just enough to really look at the results).  If you have enough data, I'd go full out unstructured and use type=chol.

Steve Denham

New Contributor
Posts: 4

Re: Proc glimmix with ordinal outcomes and repeated measures

That’s very reassuring. Thanks so much for taking the time to look at it
for me Steve. I will be sure to try different covariance structures now that I
know the model is set up properly Smiley Happy

Regarding how it affects things to put in a type= option, this is my
current understanding (from a non-statistician perspective) which I hope I have
right!

random intercept week/subject=student ;

or equivalently

random intercept week/subject=student type=VC ;

This models the trend over weeks by student. That is, whether the effect of week
on grade depends on which student we are talking about, or, put another way,
whether there is a different change in grade over the weeks for each different student.
This accounts for the correlation between repeated measurements on a student, but
assumes the correlation is the same no matter how close together or far apart
the weeks are.


random intercept week/subject=student type=ARH(1) ;

This models the trend over weeks by student and allows the correlation between
repeated measurements on a student to decline as weeks get further apart. Exact
pattern of decline depends on which type= we are talking about. ARH(1) for example,
can accommodate  unequal spacing and change over the weeks whereas AR(1) assumes

that all measurements made the same number of weeks apart share the same correlation

as each other. There are other covariance structures with other patterns and rates of change in variance.

Respected Advisor
Posts: 2,655

Re: Proc glimmix with ordinal outcomes and repeated measures

Pretty close, except that heterogeneous autoregressive DOES assume equal spacing in time, the heterogeneity is in the variance component (diagonal) for each time point (see the documentation for TYPE= in the PROC MIXED documentation),  For unequal spacing in time, you should look at spatial power or a spline.

Steve Denham

New Contributor
Posts: 4

Re: Proc glimmix with ordinal outcomes and repeated measures

Ah now I get it!

I was mixing up what the diagonal and off-diagonals were for.

Thanks for pointing that out for me Steve :smileycool:

Ask a Question
Discussion stats
  • 4 replies
  • 696 views
  • 3 likes
  • 2 in conversation