[R-sig-ME] categorical random effects correlation in lme4

Henrik Singmann henrik.singmann at psychologie.uni-freiburg.de
Wed May 22 11:56:55 CEST 2013


Hi Andrew,

I think one of the problems is that in your model fm1_ml does not what you want. In this model you only estimate the random slopes but *not* the random intercepts for the prmiary_ther. As the lme4 faq (http://glmm.wikidot.com/faq) explains:

(0+x|group): 	random slope of x within group: no variation in intercept

What you want is one of the following:

(x|group): 	random slope of x within group with correlated intercept
(1|group) + (0+x|group): 	uncorrelated random intercept and random slope within group


I hope this helps,
Henrik


Am 21/05/2013 17:41, schrieb Andrew McAleavey:
> Hi,
>
> I'm currently investigating a question of relative effectiveness of
> therapists, and the particular question is whether some therapists are
> differentially effective with white versus racial/ethnic minority clients
> (this is coded as a binary variable called "white" in this data). We have
> conceptualized this as a cross-level random effect, so the model has one
> random effect for therapist intercept and one effect for the difference in
> effectiveness between their white and nonwhite clients.
>
> I am relatively new to lme4, but I think I have specified the model
> correctly (the fixed effects represent client pretreatment severity and the
> nonsignificant fixed effect of binary race; they don't seem to impact the
> estimation problem). Here's the model of interest:
>> print(fm1_ml <- lmer(DI ~ first_di + white + (0 +
> factor(white)|primary_ther), rem3post, REML=F), corr=F)
>
> The problem is that the two random effects are appearing to correlate at r
> = 1.000. I think this is an estimation problem, and probably indicates that
> the random variables aren't accounting for all that much variance. I'm
> dubious of interpreting this model, therefore. However, when comparing it
> to the random intercepts only model using the LRT, there is a significant
> difference, suggesting that even though the explained variance is (very)
> small, it may be worth including:
>> anova(fm1_a_ml, fm1_ml)
> Data: rem3post
> Models:
> fm1_a_ml: DI ~ first_di + factor(white) + (1 | primary_ther)
> fm1_ml: DI ~ first_di + factor(white) + (0 + factor(white) | primary_ther)
>                  Df    AIC      BIC      logLik     Chisq    Chi Df
> Pr(>Chisq)
> fm1_a_ml   5    4982.7  5011.3  -2486.3
> fm1_ml      7    4979.9   5019.9  -2482.9  6.7871      2        0.03359 *
>
> My question is basically this: How should I interpret these results? There
> are significant differences between therapists in terms of their relative
> effectiveness with white vs. nonwhite clients, but they're just small? Or
> is even this not justified? Would it be safer to say that there are likely
> no estimable differences? Am I missing something else?
>
> Thanks a lot,
> Andrew McAleavey
>
> Here's the model of interest output:
>> print(fm1_ml <- lmer(DI ~ first_di + factor(white) + (0 +
> factor(white)|primary_ther), rem3post, REML=F), corr=F)
> Linear mixed model fit by maximum likelihood
> Formula: DI ~ first_di + factor(white) + (0 + factor(white) | primary_ther)
>     Data: rem3post
>    AIC  BIC logLik deviance REMLdev
>   4980 5020  -2483     4966    4983
> Random effects:
>   Groups       Name              Variance        Std.Dev.   Corr
>   primary_ther factor(white)    0 0.0417050  0.204218
>                   factor(white)1     0.0044086     0.066397   1.000
>   Residual                            0.5099596     0.714115
> Number of obs: 2263, groups: primary_ther, 192
>
> Fixed effects:
>                       Estimate Std. Error t value
> (Intercept)        0.45138    0.06007   7.514
> first_di             0.48009    0.02360   20.338
> factor(white)1   0.01140    0.03298   0.346
>

-- 
Dipl. Psych. Henrik Singmann
PhD Student
Albert-Ludwigs-Universität Freiburg, Germany
http://www.psychologie.uni-freiburg.de/Members/singmann



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