Programming the statistical procedures from SAS

Comparison Glimmix(SAS) and Gllamm(Stata)

Reply
N/A
Posts: 0

Comparison Glimmix(SAS) and Gllamm(Stata)

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)
Regular Contributor
Posts: 169

Re: Comparison Glimmix(SAS) and Gllamm(Stata)

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.
Ask a Question
Discussion stats
  • 1 reply
  • 609 views
  • 0 likes
  • 2 in conversation