[R-sig-ME] Model selection in GAMM

Ben Bolker bbolker at gmail.com
Sun Mar 17 20:44:28 CET 2013


Mari Laine <mslain at ...> writes:


> I'm using GAMM (mgcv::gamm) to fit non-Gaussian models with several
> fixed factors and also a temporal structure. Additionally, I'm
> fitting non-linearity with smoothers. I have several correlated main
> effect candidates, and I would like to compare their GAMMs and see,
> which one of the models best fits the data. I would also need to
> tune the models via dropping unnecessary smoothers (linear ones) and
> non-significant fixed variables.
 
> After going through some statistical books, I'm under the impression
> that one should not use AIC comparison of $lme's for GAMM models -
> is this correct? Could someone give instruction on the model
> selection in GAMM or refer me to a book / some other source of
> information on this matter?

  To my knowledge there are two issues here:

(1) GAMM uses penalized quasi-likelihood.  According to some statisticians
(including Brian Ripley, who wrote the original PQL code in 
MASS::glmmPQL, which might be what GAMM relies on -- I don't remember,
it might incorporate its own PQL code), one shouldn't use likelihood-based
approaches (including AIC) with PQL algorithms, because they don't
estimate a true likelihood (others say it's OK as long as you
make sure to scale the likelihood to get a quasi-likelihood before
combining it with the penalty term to get a QIC).

(2) As I recall it's a little tricky to figure out which components
of a GAMM call contain which kinds of information about the fit.
In particular it's not clear whether the likelihood/AIC reported
in the lme component of the fit really reflect an appropriate
(quasi)likelihood/IC of the full model; I believe there's a lot
of detail on this in the ?gamm help page: in particular,

> For example,
> unlike ‘glmmPQL’ from ‘MASS’ it will return the complete ‘lme’
> object from the working model at convergence of the PQL iteration,
> including the `log likelihood', even though this is not the
> likelihood of the fitted GAMM.

which suggests you shouldn't use that log-likelihood ...

  I would look for further information in Simon Wood's excellent book on 
generalized additive models.



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