[R-sig-ME] 2-level null versus 1 level null model
David Duffy
David.Duffy at qimr.edu.au
Sat Jun 23 00:24:24 CEST 2012
On Fri, 22 Jun 2012, Ben Pelzer wrote:
> one <- rep(1, length(Y))
>
> M01level <- lmer (Y ~ (1 | one), REML=FALSE)
> M02level <- lmer (Y ~ (1 | one) + (1 | country), REML=FALSE)
> anova(M02level, M01level)
>
> This seams to work properly. However, I don't feel really convinced by this
> solution yet. Is it to be trusted, or is there a much simpler way to test
> this using lmer? Thanks for any help!!!
Yes, this works. The RLRsim package does an exact test - the
distribution of the likelihood ratio test isn't straightforward (at the
very least it's a mixture of chi-squares).
Cheers, David Duffy.
More information about the R-sig-mixed-models
mailing list