[R-sig-ME] Chi-square test on random effects
kushler at oakland.edu
Thu Oct 7 18:25:50 CEST 2010
I believe the RLRsim package provides a better solution.
Regards, Rob Kushler
On 10/6/2010 7:01 PM, Christopher Desjardins wrote:
> On Wed, Oct 6, 2010 at 5:05 PM, Ned Dochtermann
> <ned.dochtermann at gmail.com>wrote:
>> Hi Chris,
>> You're not going to be able to do that test using lmer. To conduct the test
>> you want you'll need to know the likelihood estimates for two models, one
>> with the random factor and another without it. You can't run a model
>> the random factor in lme4 and you can't use the likelihood from lm because
>> they aren't "commensurate" between lme4 and lm (this issue is discussed at:
>> http://glmm.wikidot.com/random-effects-testing). I've run the same sorts
>> tests for lmer and lm, as I'm sure many other people have and they aren't
>> You can, however, get what you want using nlme:
>> (I don't use nlme much so you may want to double check the code syntax)
>> Then you just run the likelihood ratio test from there, I think with nlme
>> LRT is built in as anova(m.rand,m.null).
>> This issue has been discussed a lot so you may find more detailed info by
>> searching the archives.
>> Good luck,
>> Ned Dochtermann
>> Department of Biology
>> University of Nevada, Reno
>> ned.dochtermann at gmail.com
>> I originally ran a model in HLM 6 that I am now in lme4. In lme4 the model
>> would look like the following:
>> lmer(Y ~ 1 + (1 | Group), data= data)
>> So I only have a random intercept for Group.
>> I noticed that HLM 6 gives a chi-square test statistic associated with this
>> random variable. Does anyone know how I can calculate this chi-square
>> statistic in R or what formula the HLM authors are using?
>> [[alternative HTML version deleted]]
More information about the R-sig-mixed-models