[R-sig-ME] GLMM with mgcv::gam

Andreas Böck andreas.boeck at tum.de
Mon Aug 27 14:55:49 CEST 2012


Dear Mixed-Model Experts,

my question is about the mgcv::gam function in a recent version (version 
1.7-19 or 1.7-20).

Is it true, that gam(y ~ x1+ s(id, bs="re"), method ="REML", 
family=binomial) does the following:
- setup the model
- call MASS::glmmPQL where
    glmmPQL somehow iterates between nlme::lme and glm.fit calls
- make the results look like a gam object

The method="REML" argument affects only the lme part in the fitting 
procedure ?

If the above is true, is it prefarable to use glmer(y~x1 + (1|id), 
family="binomial") or gamm4, as the approach in the lme4 package is more 
reliable as the penalized-quasi-likelihood approach in package MASS, 
especially for binomial families?

Thank you very much for clarification !

Best,
Andi Böck
(PhD candidate, Munich)

PS: Sorry for eventually double posting, got an error from naver.com, I 
didn't understand



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