[R-sig-ME] Contrasts for interactions in lmer
Paul Metzner
paul.metzner at gmail.com
Thu Aug 12 10:44:09 CEST 2010
Dear all.
I am currently analyzing eye-tracking data and am interested in a main effect of condition (COND) plus its interaction with subjects' operation span (PCU) and the direction of a verb bias (1 or 2). The contrasts are:
> contrasts(COND)
> [,1]
> a -1
> b 1
and
> contrasts(DIR)
> [,1]
> 1 -1
> 2 1
PCU is a continuous predictor which I centered by subtracting the mean (the problem does, however, persist when I split the sample into extreme groups and work with a categorial predictor). With the following model, I don't get a correlation between the fixed effects:
> Linear mixed model fit by REML
> Formula: RRT ~ COND * PCU * DIR + (1 | SUBJECT) + (1 | ITEM)
> Data: fm3
> AIC BIC logLik deviance REMLdev
> 46733 46801 -23355 46768 46711
> Random effects:
> Groups Name Variance Std.Dev.
> SUBJECT (Intercept) 8918.29 94.437
> ITEM (Intercept) 404.85 20.121
> Residual 34881.69 186.766
> Number of obs: 3503, groups: SUBJECT, 59; ITEM, 59
>
> Fixed effects:
> Estimate Std. Error t value
> (Intercept) 122.900 12.963 9.481
> COND1 15.924 3.165 5.031
> PCU 139.411 120.025 1.162
> DIR1 -7.746 4.107 -1.886
> COND1:PCU 48.309 29.850 1.618
> COND1:DIR1 -3.396 3.164 -1.073
> PCU:DIR1 -26.835 29.814 -0.900
> COND1:PCU:DIR1 -8.069 29.838 -0.270
>
> Correlation of Fixed Effects:
> (Intr) COND1 PCU DIR1 COND1:PCU COND1:D PCU:DI
> COND1 0.002
> PCU 0.004 -0.001
> DIR1 0.002 -0.004 0.004
> COND1:PCU -0.001 -0.001 0.003 0.000
> COND1:DIR1 -0.001 0.000 0.000 0.007 0.021
> PCU:DIR1 0.005 0.000 -0.003 0.000 -0.009 -0.005
> COND1:PCU:D 0.000 0.021 -0.002 -0.004 -0.009 -0.001 0.011
But, since I'm mainly interested in the interactions and not so much the main effects of PCU and DIR, I changed the model to the following:
> Linear mixed model fit by REML
> Formula: RRT ~ COND + COND:PCU + COND:DIR + (1 | SUBJECT) + (1 | ITEM)
> Data: fm3
> AIC BIC logLik deviance REMLdev
> 46744 46800 -23363 46769 46726
> Random effects:
> Groups Name Variance Std.Dev.
> SUBJECT (Intercept) 8911.15 94.399
> ITEM (Intercept) 406.16 20.153
> Residual 34869.91 186.735
> Number of obs: 3503, groups: SUBJECT, 59; ITEM, 59
>
> Fixed effects:
> Estimate Std. Error t value
> (Intercept) 122.962 12.959 9.489
> COND1 15.941 3.164 5.039
> CONDa:PCU 91.049 123.553 0.737
> CONDb:PCU 187.055 123.714 1.512
> CONDa:DIR1 -4.340 5.168 -0.840
> CONDb:DIR1 -11.160 5.204 -2.144
>
> Correlation of Fixed Effects:
> (Intr) COND1 CONDa:PCU CONDb:PCU CONDa:DIR1
> COND1 0.002
> CONDa:PCU 0.004 -0.001
> CONDb:PCU 0.004 -0.001 0.883
> CONDa:DIR1 0.002 -0.003 0.006 0.000
> CONDb:DIR1 0.001 -0.003 0.000 0.006 0.256
Not I do get a considerable correlation between the interactions. From the output (CONDa:…, CONDb:…), I infer that the model didn't always use helmert coding for condition but applied something else for the interactions. Is that right? When I code COND numerically as -1 and 1, the correlations turn out fine, which supports my conclusion. I would be very grateful for suggestions.
Thanks,
Paul
---
Paul Metzner
Humboldt-Universität zu Berlin
Philosophische Fakultät II
Institut für deutsche Sprache und Linguistik
Post: Unter den Linden 6 | 10099 Berlin | Deutschland
Besuch: Dorotheenstraße 24 | 10117 Berlin | Deutschland
+49-(0)30-2093-9726
paul.metzner at gmail.com
http://amor.rz.hu-berlin.de/~metznerp/
More information about the R-sig-mixed-models
mailing list