[R-sig-ME] order of models when using anova

Steve Taylor steve.taylor at aut.ac.nz
Thu Feb 20 21:53:23 CET 2014


Both ways work.  I think anova() is smart enough to figure out which model is the smaller one.

library(lme4)
example(glmer)
# Compare these outputs...
anova(gm1,gm2)
anova(gm2,gm1)

cheers,
     Steve
____________________________________________

Steve Taylor
   Biostatistician
   Faculty of Health and Environmental Sciences
   AUT University
   http://www.aut.ac.nz/profiles/steve-taylor
____________________________________________

-----Original Message-----
From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Juliet Hannah
Sent: Friday, 21 February 2014 5:22a
To: r-sig-mixed-models at r-project.org
Subject: [R-sig-ME] order of models when using anova

All,

When using the anova command to compare nested models I thought the order was

anova(reduced model, full model)

Where the 'full model' has more terms.


However, looking at the slides on:

http://lme4.r-forge.r-project.org/slides/2009-07-21-Seewiesen/6Interactions-4a4.pdf


pg 3 (comparing the model fits), it looks like I had this backward.

Did I have it backward, or is lme4 different, or is the order not important?

Thanks,

Juliet

	[[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



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