Could you send us the entire output from anova including the model
specifications?  The Df and logLik columns seem peculiar.  Mod2 should be a
submodel of mod1 but it has more parameters.  Also, could you send the
output of str(dataframe(a=a,b=b,Year=Year,ID=ID))?  Is b a factor or a
numeric covariate?


On Sat, Jan 26, 2013 at 9:24 AM, Ron Stone <ronstone1980@gmail.com> wrote:

> 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
>
> _______________________________________________
> R-sig-mixed-models@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]

