BookmarkSubscribeRSS Feed
halladje
Fluorite | Level 6

Hello, 

 

I am trying to estimate the exchangeable working correlation for classroom and school clustering in a 3-level model. 

 

I can estimate the ICC using GLIMMIX, however, I am wondering if it is possible to estimate a 3-level model using GENMOD as well?

 

Currently, my two level model is producing an exchnageable working correlation with the folloiwng code:

 

proc genmod daya=sel;

class schoolid sel;

model sel (ref=first)=/D=B link=logit;

repeated subject schoolid/type=exch covb;

run;

 

When I try to add in a third level, the following code works but only provides one exchangeable working correlation. Is there a way to separate the class from the school exchangeable working correlation in GENMOD? If so, how do I fix the following code? 

 

proc genmod daya=sel;

class schoolid classid sel;

model sel (ref=first)=/D=B link=logit;

repeated subject schoolid/type=exch covb;

repeated subject classid(schoolids)/type=exch covb;

run;

 

Thanks in advance! 

 

 

1 REPLY 1
StatDave
SAS Super FREQ

GENMOD does not estimate multilevel models. Only one REPEATED statement is allowed. 

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 25. 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
  • 497 views
  • 0 likes
  • 2 in conversation