[R-sig-ME] Comparing two models using anova () (lmer, lme4), get Chisq = 0, Pr(>Chisq) = 1, error or not?

Ron Stone ronstone1980 at gmail.com
Sat Jan 26 16:24:37 CET 2013


Dear all,

I've tried to search to solve my issue, but without any success.

I run two models in lmer (lme4), one with two random effects "Year"
and "ID" (mod1) and one model with only "ID". I compare mod1 (with
both random effects) and mod2 (with only ID) to see if "Year"
significant.

I get Chisq = 0, Pr(>Chisq) = 1, see below. I find it a bit strange to
get this value, is this an error? Or does not "Year" contribute at all
and could I state that "Year" is not significant?

mod1<-lmer(a~ b +(1|Year)+(1|ID))
mod2<-lmer(a ~ b+(1|ID))


library(Matrix)
library(lattice)
options(show.signif.stars = FALSE)
anova(mod1,mod2)

              Df         AIC        BIC       logLik    Chisq    Chi
Df       Pr(>Chisq)
mod1       8    29.394   53.426    -6.6971
mod2       9    31.537   58.573    -6.7685           0         1
           1

Regards,
Ron



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