[R-sig-ME] gamm4 model fit error

Ben Bolker bbolker at gmail.com
Sun Jul 13 17:33:46 CEST 2014


On 14-07-13 08:13 AM, Nicholas Lange wrote:
> Hello,

> I'm running R.3.1.1 on Mac OS X 10.6.8 with gamm4 version 0.2-2 and
>  lme4 version 1.1-7. I get the following error when trying to fit the
>  simplest gamm4 model I can think of:

>> fit = gamm4( y ~ s(x))
> 


> Warning message: In deviance.merMod(ret$mer) : deviance() is
> deprecated for REML fits; use REMLcrit for the REML criterion or
> deviance(.,REML=FALSE) for deviance calculated at the REML fit.

Note that in R terminology this is a warning, not an error (sorry to
be fussy about terminology, but it helps to be precise).  This is
due to a change in 1.1-7 -- we apologize to the gamm4 maintainers,
presumably they can fix this up in a future release.  It should
be harmless, though.


>> fit
> 
> $mer
> Linear mixed model fit by REML ['lmerMod']
> REML criterion at convergence: 3891.265
> Random effects:
>  Groups   Name        Std.Dev.
>  LabID    (Intercept) 112.16  
>  Xr       s(AgeYears) 452.89  
>  Residual              35.24  
> Number of obs: 343, groups:  LabID, 156; Xr, 8
> Fixed Effects:
>    X(Intercept)  Xs(AgeYears)Fx1  
>         1310.73            23.13  
> 
> $gam
> 
> Family: gaussian 
> Link function: identity 
> 
> Formula:
> TotalBrain ~ s(AgeYears)
> 
> Estimated degrees of freedom:
> 5.28  total = 6.28 
> 
> lmer.REML score: 3891.265     
> 
> Not the usual regression summary table, no p-values.
> 
> Does anyone see what's wrong? Any help would be greatly appreciated.
> 
> Nick

  It's been a while since I've looked at gamm4.  Just to be precise,
is this the first time you've used gamm4 -- i.e. this is not a change
from previous versions?  I *think* the answer is that you need to
operate on the $mer component of the result, e.g.

coef(summary(fit$mer))

... but perhaps someone with more experience of gamm4 can comment.


  Ben Bolker



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