BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Gilles-Protais
Obsidian | Level 7

Please I wish to know whether there is SAS code, on GLIMMIX to  handle when the proportional odds assumptions is not verified. So I wish to model the ordinal outcome with different slopes, taking into consideration the random effects. 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

See the Addendum at the bottom of this note which shows how you can fit a nonproportional odds model to an ordinal response in PROC NLMIXED. You could add a random effect in the model if needed.

View solution in original post

10 REPLIES 10
Gilles-Protais
Obsidian | Level 7

Please I wish to know whether there is SAS code, on GLIMMIX to  handle when the proportional odds assumptions is not verified. So I wish to model the ordinal outcome with different slopes, taking into consideration the random effects. 

Thanks

Ksharp
Super User
It looks like you are doing survival analysis . Do you check PROC PHREG 's RANDOM statement ?
Gilles-Protais
Obsidian | Level 7

Greetings,

Thanks very much for your reply,

Actually am working on a project concerning discrete longitudinal analysis.

And actually there is evidence of different slopes, so I want to have initial values for me run the NLMIXED procedure. 

when there is evidence of equal slopes, e usually do the GLIMMIX procedure to get the initial values.

 

sbxkoenk
SAS Super FREQ

You need a "Random Coefficient Model" with random intercepts and random slopes for each "class"?

 

See this paper:

Paper SAS026-2014
Analyzing Multilevel Models with the GLIMMIX Procedure
Min Zhu, SAS Institute Inc.
https://support.sas.com/resources/papers/proceedings14/SAS026-2014.pdf

 

This PROC GLIMMIX is on page 11.

proc glimmix data=mctrial;
class patient center treat;
model dbp = dbp1 treat visit / solution;
random intercept visit / subject = center type=chol;
random intercept       / subject = patient(center) ;
covtest 'Diagonal G' DIAGG;
estimate 'Carvedil vs. Atenolol' treat 1 -1 0;
estimate 'Carvedil vs. Nifedipi' treat 0 1 -1;
run;

Koen

Gilles-Protais
Obsidian | Level 7

No , the code below shows a cumulative logit model for  equal slopes across the category of the outcome, But I want a was procedure that can produce me different slopes across different categories; if it is possible

 

proc glimmix data=longil_cat  method=RMPL;
title 'PROC GLIMMIX analysis, ordinal, RMPL';
class id sex(ref="0") smoking(ref="0");
model bmi_cat = time smoking **bleep**e sex time***bleep**e time*sex/ dist=multinomial link=cumlogit solution;
/*random intercept time/ subject=id type=un;*/
random intercept/ subject=id type=un;
/*nloptions maxiter=5000;*/
run;
Ksharp
Super User

PROC LOGISTIC has UNEQUALSLOPES option in the MODEL statement. Check the example Example 79.18: Partial Proportional Odds Model in its documentation.

 

Ksharp_0-1701753330591.png

 

Gilles-Protais
Obsidian | Level 7
But it does not take into consideration the random effect
sbxkoenk
SAS Super FREQ

Hello,

 

Not sure if UNEQUALSLOPES can be done in a multinomial logit model that is fit with PROC GLIMMIX (because there are mixed effects).

 

I cannot see that covered in:

Usage Note 22871: Types of logistic (or logit) models that can be fit using SAS®
(Date Modified: 2018-09-18 11:31:00)
https://support.sas.com/kb/22/871.html

 

6 times the string "unequal" is there on that page, but not when GLIMMIX is talked about.

 

Last update of above usage note was done in September 2018, so maybe @StatDave has more info??

 

BR, Koen

StatDave
SAS Super FREQ

See the Addendum at the bottom of this note which shows how you can fit a nonproportional odds model to an ordinal response in PROC NLMIXED. You could add a random effect in the model if needed.

Gilles-Protais
Obsidian | Level 7

Thanks for your reply,  I have tried the code, below and I have very strange results like very high standard errors, what might be the case? because I sude glimmiw for equal slopes and the results look attractive

 


proc nlmixed data=longil_cat noad  qpoints=30;
title 'BMICAT, PROC NLMIXED, ordinal, adaptive, q=30';
parms int1=2.5080 int2=4.5586 d= 0.07258;

eta1 =int1+ b+beta11*time + beta12***bleep**e + beta13*smoking + beta14*sex + beta15*time***bleep**e + beta16*time*sex;
eta2 = int2 + b + beta11*time + beta22***bleep**e + beta13*smoking + beta14*sex + beta25*time***bleep**e + beta26*time*sex;

if bmi_cat=1 then z = (1/(1+exp(-eta1)));
else if bmi_cat=2  then z = (1/(1+exp(-eta1))) - (1/(1+exp(-eta2)));
else z = 1 - (1/(1+exp(-eta2)));
if z > 1e-20 then ll = log(z);
else ll = -1e10;
model bmi_cat ~ general(ll);
random b ~normal(0,d**2) subject= id out=EB;
estimate 'var(d)' d*d;

run;
parameter_est_lda.png

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 10 replies
  • 1961 views
  • 1 like
  • 4 in conversation