[R] ANOVA within a GAMM framework

Maik Eisenbeiß maik.eisenbeiss at uni-muenster.de
Mon Oct 22 16:17:11 CEST 2007

Hi R user, 

I am using the gamm() function of the mgcv-package. Now I would like to
decide on the random effects to include in the model. Within a GAMM
framework, is it allowed to compare the following two models 

    inv_1<-gamm(y~te(sat,inv),data=daten_final, random=list(proband=~1))

    inv_2<-gamm(y~te(sat,inv),data=daten_final, random=list(proband=~sat))

with a likelihood ratio test for a traditional GLMM, like this:

anova(inv_1$lme, inv_2$lme)

The output is as follows: 

          Model df      AIC      BIC    logLik   Test  L.Ratio p-value
inv_2$lme     1 10 21495.90 21557.59 -10737.95                        
inv_1$lme     2  8 23211.12 23260.46 -11597.56 1 vs 2 1719.214  <.0001

Or is this not in tune with the automatic smoothing parameter selection
(i.e. it is not exactly the same for both model alternatives)?

If not, how can I decide on the selection of random effects?

Thanks in advance for your help.

Best regards 

Dipl.-Kfm. Maik Eisenbeiß 
Marketing Centrum Münster 
Institut für Anlagen und Systemtechnologien 
Westfälische Wilhelms-Universität Münster
Am Stadtgraben 13–15
48143 Münster 

Telefon: +49 251 83-29920
Telefax: +49 251 83-22903

E-Mail: maik.eisenbeiss at uni-muenster.de
Web: http://www.marketing-centrum.de/ias 

More information about the R-help mailing list