Re: [R] {Spam?} RE: {Spam?} RE: {Spam?} Re: mgcv, testing gamm vs lme, which degrees of freedom?

From: Joris Meys <>
Date: Tue, 22 Jun 2010 15:47:07 +0200

Hi Carlos,

there is no possible way you can compare both models using a classical statistical framework, be it ML, REML or otherwise. The assumptions are violated. Regarding the df, see my previous mail.

In your case, I'd resort to the AIC/BIC criteria, and if prediction is the main focus, compare the predictive power of both models using a crossvalidation approach. Wood suggests in his book also a MCMC approach for more difficult comparisons.


On Tue, Jun 22, 2010 at 1:31 AM, Carlo Fezzi <> wrote:
> Hi Christos,
> thanks for your kind reply, I agree entirely with your interpreation.
> In the first model comparison, however, "anova" does seem to work
> according to our interpretation, i.e. the "df" are equal in the two model.
> My intuition is that the "anova" command does a fixed-effect test rather
> than a random effect one. This is the results I get:
> anova(f1$lme,f2$lme)
>       Model df      AIC      BIC    logLik
> f1$lme     1  5 466.6232 479.6491 -228.3116
> f2$lme     2  5 347.6293 360.6551 -168.8146
> Hence I was not sure our interpretation was correct.
> On your second regarding mode point I totally agree about the appealing of
> GAMs... howver, I am working in a specific application where the quadratic
> function is the established benchmark and I think that testing against it
> will show even more strongly the appeal of a gamm approach. Any idea of
> which bases could work?
> Finally thansk for the tip regarding gamm4, unfortunately I need to fit a
> bivariate smooth so I cannot use it.
> Best wishes,
> Carlo

Joris Meys
Statistical consultant

Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

tel : +32 9 264 59 87
Disclaimer :

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 22 Jun 2010 - 13:52:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 Jun 2010 - 14:00:35 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive