[R-sig-ME] general GLMM questions

Ben Bolker bolker at ufl.edu
Mon May 12 17:45:15 CEST 2008

Hash: SHA1

| lme4-specific questions:
| 6. Behavior of glmer: Does glmer really use AGQ, or just Laplace?
| Both?  pp. 28-32 of the "Implementation" vignette in lme4 suggest that
| a Laplace approximation is used, but I can't figure out whether this
| is an additional approximation on top of the AGQ/Laplace approximation
| of the integral over the random effects used in "ordinary" LMM.  When
| I fit a GLMM with the different methods, the fitted objects are not
| identical but all the coefficients seem to be.  (I have poked at the
| code a bit but been unable to answer this question for myself
| ... sorry ...)
|> To answer this question I must again, I regret, distinguish between
|> the CRAN version of the lme4 package and the R-forge development
|> version of lme4.
|> In the R-forge version the only method for generalized linear mixed
|> models and for nonlinear mixed models is direct optimization of the
|> Laplace approximation to the deviance.  One of the Summer of Code
|> projects that Google has funded for the R Foundation (see
|> http://code.google.com/soc/2008/rf/about.html) is implementation of
|> the Adaptive Gauss-Hermite Quadrature approximation to the deviance.
|> That will be implemented in the development version (i.e. the R-forge
|> version) of the lme4 package.  [snip]

~   Great!

~  A minor feature request: does it make sense to update the
documentation and code of glmer to make it clear that it does
*not* do AGQ at the moment?  I guess that depends how soon you
would expect the GSoC code to come online ...

|> I realize that it is somewhat irritating and confusing to readers of
|> this list to have descriptions of the R-forge version of the package
|> contrasted with the CRAN version.  It is natural to expect that the
|> R-forge version should be the version on CRAN.  The reason that I have
|> not yet released the R-forge to CRAN is because of problems with the
|> mcmcsamp function in the R-forge version.  If I moved the R-forge
|> version to CRAN then code from Harald Baayen's book and probably code
|> from Gelman and Hill's book would no longer work.  Software versions
|> can be changed much more readily than can editions of a book.  I think
|> there is a way around the problem with mcmcsamp but I won't be able to
|> say for sure until it is coded and tested, which will take time.  I
|> don't want to predict exactly how much time - I always manage to
|> underestimate drastically.

~   If (just hypothetically speaking) I were writing a review that
would be published in 6 months or so, do you have a recommendation?
(Would you still trust GLMM/mcmcsamp results from the CRAN version?)

| (The glmmML package claims to fit via Laplace or Gauss-Hermite
| quadrature (with non-adaptive, but adjustable, number of quad points
| -- so it's at least theoretically possible?)
|> Yes.  I think the adaptive part is important (in fact, I know it is
|> important) and probably more important than the distinction between
|> the Laplace approximation and Gauss-Hermite quadrature.  That is, you
|> gain more from using the Laplace approximation at the conditional
|> modes of the random effects (which is the "adaptive" part) than
|> increasing the number of Gauss-Hermite quadrature points at the
|> marginal modes.  The tricky bit of AGQ or Laplace is determining the
|> conditional modes and that part is already done.

~  OK, I was confused about the distinction in the meaning of
"adaptive" (as you pointed out previously on r-help ...)  I think
I have it now.


~  thanks for your help!

~  Ben Bolker
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the R-sig-mixed-models mailing list