Skip to content

GLMM (lme4) vs. glmmPQL output

4 messages · Dieter Menne, Peter Dalgaard, Brian Ripley

#
Goran,

from my reply to a message from Douglas Bates; ">" is quoted from a mail by
DG.
I have compared glmmPQL, glmmML, geese and GLMM, results and code see below.
I am aware that glmmPQL uses another method to handle the problem, and
geese (geepack) has considerable different assumptions, but the
results are very similar. On the other hand, I had expected that glmmML
results, if reasonable at all, should be close to GLMM. Yet they are not,
but rather come close to the other three.

See for example the last factor (I(week>2): significant effects in all
cases except GLMM.

-----------------------------
(glmmPQL)
Fixed effects: y ~ trt + I(week > 2)
                Value Std.Error  DF t-value p-value
(Intercept)      3.41     0.519 169    6.58  0.0000
trtdrug         -1.25     0.644  47   -1.94  0.0588
trtdrug+        -0.75     0.645  47   -1.17  0.2484
I(week > 2)TRUE -1.61     0.358 169   -4.49  0.0000

(glmmML)
                  coef se(coef)     z Pr(>|z|)
(Intercept)      3.579    0.701  5.10  3.3e-07
trtdrug         -1.369    0.694 -1.97  4.8e-02
trtdrug+        -0.789    0.700 -1.13  2.6e-01
I(week > 2)TRUE -1.627    0.482 -3.38  7.3e-04

(geese from geepack)
                estimate san.se  wald        p
(Intercept)        2.844  0.529 28.92 7.56e-08
trtdrug           -1.113  0.586  3.61 5.76e-02
trtdrug+          -0.634  0.544  1.36 2.44e-01
I(week > 2)TRUE   -1.325  0.368 12.96 3.18e-04

(GLMM)
                 Estimate Std. Error  DF z value Pr(>|z|)
(Intercept)       3.41202    3.93293 169  0.8676   0.3856
trtdrug          -1.24736    1.52156  47 -0.8198   0.4123
trtdrug+         -0.75433    1.21963  47 -0.6185   0.5363
I(week > 2)TRUE  -1.60726    2.19660 169 -0.7317   0.4644

---------------
data(bacteria,package="MASS")
UseMASS<-F# must restart R after changing because of nlme/lme4 clash
if (UseMASS){
  library(MASS) # required for bacteria
  options(digits=3)
  print(summary(glmmPQL(y ~ trt + I(week > 2), random = ~ 1 | ID,
                  family = binomial, data = bacteria)))
  library(glmmML)
  print(glmmML(y=="y"~trt+I(week>2), data=bacteria,cluster=bacteria$ID))
  library(geepack)
  summary(geese(y == "y" ~ trt + I(week > 2), family = binomial,
     id = ID, corstr = "exchangeable",data=bacteria))
} else
{
  library(lme4)
  # try a well documented "old" lme to compare lme4/lme3 for normal things
#  data(Orthodont,package=nlme)
#  fm <- lme(distance ~ Sex*I(age-11), data =
Orthodont,random=~I(age-11)|Subject)
#  summary(fm)
  summary(GLMM(y ~ trt + I(week > 2), random = ~ 1 | ID,
                  family = binomial, data = bacteria,method="PQL"))
 }
#
"Dieter Menne" <dieter.menne at menne-biomed.de> writes:
I suspect that a small simulation study would be enlightening. Given
the experimental status of lme4, I wouldn't feel too sure that there
is agreement between theory and implementation. There might be a bug
there, or maybe all the other methods make essentially the same
(large) error. In either case, I'd certainly like to know the reason.
#
Although it has not been stated nor credited, this is very close to an
example in MASS4 (there seems a difference in coding).  Both the dataset 
and much of the alternative analyses are from the work of my student James 
McBroom (and other students have contributed).

MASS4 does contain comparisons with other methods, including our
implementation of the `gold standards', numerical ML and Bayes posterior
densities with a vague prior.  We have also run this example against
several other implementations and simulated from the fitted (by numerical
ML) model.  All of our comparisons have suggested that glmmPQL is in the
right ball park, so once I realised the origin of the example the GLMM
results surprised me.
On Mon, 12 Jan 2004, Dieter Menne wrote:

            
[...]
#
Prof Brian Ripley wrote:

            
I apologize for the oversight. This is to state that the code starting
is slightly modified from MASS (Modern Applied Statistics, by W.N. Venables
and Prof. B. Ripley, Code in MASS\scripts\ch10.R). ISBN Code upon request.

Dieter Menne