BookmarkSubscribeRSS Feed
iuri_leite
Fluorite | Level 6

Dear coleagues,

I would like to identify factors associates with an ordinal outcome of a longitudinal data. Is it possible to do it using Proc Glimmix?

Is it also possible to select different types of covariance structure?

could anyone send me a example in case it is easily available?

Best regards,

Iuri

3 REPLIES 3
SteveDenham
Jade | Level 19

Yes to both questions.  Here are some links with example code:

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2811235/  -> Look at sample code A5.

https://www4.stat.ncsu.edu/~dzhang2/epid766/766note.pdf  -> Start on page 172.  There is code for GLIMMIX that looks like this (minor changes are mine):

title "Random intercept model for infection disease data";
proc glimmix data=indon method=quad;
class id sex;
model infect = xero sinv age time sex height / dist=bin link=logit s;
random int / subject=id type=vc;
run;

If you wished to model time as a repeated measure effect, this code would work for the data in question (not presented in class notes).  This maintains the conditional nature of the inference.  A marginal model can be obtained by changing the method to rspl, and adding a residual option to the second RANDOM statement.

title "Random intercept model for infection disease data";
proc glimmix data=indon method=quad;
class id sex;
model infect = xero sinv age time sex height / dist=bin link=logit s;
random int / subject=id type=vc; <This statement might be removed for some of the covariance structures tested below (UN, CS, CSH) or left in for others (AR(1), ARH(1), ANTE(1))
random time/subject=id type= <Here you would have to pick from various types that model the correlation pattern of the data, see the GLIMMIX documentation>;
run;

These are for a binomial response.  If you have an ordinal response, change the options in the MODEL statement to: dist=multinomial link=cumlogit s; 

 

I suggest trying something like these with your data, and then if there are difficulties, come back with the code you are using and the log showing any pertinent ERRORS, WARNINGS and NOTES.

 

SteveDenham

iuri_leite
Fluorite | Level 6
Dear Steve,

many thanks.

If I have any problem I will come back with the codes and errors.

Best wishes,

Iuri
iuri_leite
Fluorite | Level 6

Dear Steve,

 

thanks a lot.

 

Best regards,

Iuri

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 3 replies
  • 1080 views
  • 1 like
  • 2 in conversation