[R-sig-ME] Correlation of random effects

David Duffy davidD at qimr.edu.au
Wed Aug 4 08:23:58 CEST 2010


On Tue, 3 Aug 2010, Gustavo Betini wrote:

> m1<-lmer(pc1 ~ year + datejc + stage + rept + age + tarsusc + mtempc +
> windsc + rhc + (1|id), data=ndf, REML=0)
> m2<-lmer(pc1 ~ year + datejc + stage + rept + age + tarsusc + mtempc +
> windsc + rhc + (1+mtempc|id), data=ndf, REML=0)
>
> In order to compare these two models I would use a LRT test:
>
> anova(m1,m2)
>
> However, LRT test is not recommended when Corr is near the extremes
> (+1,-1). So, how I compare the fit of two models in lme4 when the
> correlation between two random effects are near the extremes?
>

You can always look at the likelihood ratio, the question is 
whether it follows a simple chi-square distribution under the null or not.
If the LR is large enough, then it probably won't matter 
anyway. You can obtain percentiles by an appropriate simulation 
based on your data setup, especially since m1 only has id as a random 
effect.  I don't think the RLRsim package can be used here, but its author 
may clarify on that.

Cheers, David Duffy.
-- 
| David Duffy (MBBS PhD)                                         ,-_|\
| email: davidD at qimr.edu.au  ph: INT+61+7+3362-0217 fax: -0101  /     *
| Epidemiology Unit, Queensland Institute of Medical Research   \_,-._/
| 300 Herston Rd, Brisbane, Queensland 4029, Australia  GPG 4D0B994A v




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