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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—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
  • 1 reply
  • 867 views
  • 0 likes
  • 2 in conversation