BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I’m trying to estimate an empty 3-level logistic regression model (e.g.,: years nested in subject and subject nested in schools). The variance estimates between the SAS procedure GLIMMIX and the Stata procedure GLLMM are very different. Since I'm much more familiar with Stata, I assume that my Stata estimates are correct and that something in GLIMMIX is not correctly specified (please find results and code below).

Can anyone help?
Are there any known problems with the variance estimation in Proc Glimmix?

Thank you very much,

Micha

SAS results:
Level 2 variance: 0.27 (0.05)
Level 3 variance: 3.04 (0.17)

STATA results:
Level 2 variance: 1.40 (0.13)
Level 3 variance: .4.44 (0.26)


SAS code I’m using:

PROC GLIMMIX DATA=TEMP3 NOCLPRINT;
CLASS SUBJECTID SCHOOLID;
MODEL Y1= /SOLUTION DIST=BINOMIAL LINK=LOGIT DDFM=BW;
RANDOM INTERCEPT /SUB=SCHOOLID;
RANDOM INTERCEPT /SUB=SUBJECTID(SCHOOLID);
RUN;




STATA code I’m using:

gllmm y1 family(binomial) link(logit) i(subjectid schoolid)
1 REPLY 1
Dale
Pyrite | Level 9
Your SAS code is fine. However, the (default) method of estimating the random effects which is employed by the GLIMMIX procedure (essentially a Penalized Quasi-Likelihood estimator) is known to produce random effect variance estimates which are biased toward zero. The GLLAMM program employs Gaussian quadrature to estimate the variances of the random effects. Gaussian quadrature does not suffer the same variance bias as does PQL.

If you have only a few students per school (say, 10), then it is possible to obtain quadrature-based estimates of the variances of the random effects from SAS because such models can be written with schools as the subject and then specifying as the random effects an intercept and student within school where student within school is numbered from 1 to n{school} (max(n{school})=10). I would be happy to clarify how to obtain quadrature-based variance estimates if you have such a limited number of students per school. But my guess is that you have more than 10 students/school.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2310 views
  • 0 likes
  • 2 in conversation