BookmarkSubscribeRSS Feed
yuchinher
Calcite | Level 5

Hi,

 

I am trying to model a three level logistic regression using PROC GLIMMIX. When I first added only my level 3 clustering variable into the model, the estimates and odds ratio I got look fine and reasonable. However, when I added both the level 3 and level 2 clustering variable to the model, the estimates and odds ratio I got became really big that are probably unreal (e.g., odds ratio of 40 to odds ratio of 300). I wonder if anyone knows the reasons behind and how I can fix it? Thanks for the help! 

 

The code I used for having both level 3 and level 2 clusters, which gave me really large parameters:

 

proc glimmix data=new noclprint method=laplace;
class clustervar_L3 clustervar_L2;
model event(event='1')=dur dur2 income incouple rent houseprice age sex
/solution cl link=logit dist=binary 
ddfm=bw oddsratio(DIFF=LAST LABEL);
random intercept / solution type = un subject= clustervar_L3;
random intercept / solution type = un subject= clustervar_L2(clustervar_L3);
covtest / wald;
run;
 
 
 
 
 
 
1 REPLY 1
PaigeMiller
Diamond | Level 26

@yuchinher wrote:

 

I am trying to model a three level logistic regression using PROC GLIMMIX. When I first added only my level 3 clustering variable into the model, the estimates and odds ratio I got look fine and reasonable. However, when I added both the level 3 and level 2 clustering variable to the model, the estimates and odds ratio I got became really big that are probably unreal (e.g., odds ratio of 40 to odds ratio of 300).

 

My first thought is that adding additional class variables into the model causes quasi-complete separation, or maybe even complete separation.

--
Paige Miller

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 312 views
  • 0 likes
  • 2 in conversation