[R-sig-ME] RLRsim example
fengsj at mail.utexas.edu
fengsj at mail.utexas.edu
Tue Jun 1 20:19:16 CEST 2010
I got :
> exactRLRT(m.slope, mA, m0)
Error in if (diff(anova(mA, m0)$df) > 1) { : argument is of length zero
Thanks!
Quoting Andy Fugard <andyfugard at gmail.com>:
> On Tue, Jun 1, 2010 at 7:13 PM, <fengsj at mail.utexas.edu> wrote:
>> Hi all,
>> I want to compare different glmer fits. I read examples about comparing
>> models by anova() for lmer fits and this method may not be accurate. I have
>> been checking the Package 'RLRsim' to do the test. I am very confused by
>> the example from the package reference:
>>
>> library(lme4)
>> data(sleepstudy)
>> mA <- lmer(Reaction ~ I(Days-4.5) + (1|Subject) + (0 + I(Days-4.5)|Subject),
>> sleepstudy)
>> m0 <- update(mA, . ~ . - (0 + I(Days-4.5)|Subject))
>> m.slope <- update(mA, . ~ . - (1|Subject))
>> #test for subject specific slopes:
>> ## Not run: exactRLRT(m.slope, mA, m0)
>>
>> First of all, what does it mean "not run" there? (when I did run
>> exactRLRT(m.slope, mA, m0), I got error messages) . Then , what should be
>> run?
>
> What error messages did you get? It would be helpful to see the
> complete output.
>
> Cheers,
>
> Andy
>
> --
> http://www.andyfugard.info
>
More information about the R-sig-mixed-models
mailing list