[R-lang] Lmer interactions in factorial designs

Jakke Tamminen j.tamminen at psych.york.ac.uk
Wed Jul 22 02:46:18 PDT 2009


This is probably a naive question about linear mixed-effects models, but I'm
having a lot of trouble getting my head around it. So here we go:

Imagine a 2 x 3 factorial design, with Factor A having two levels (A1 and
A2) and Factor B having three levels (B1, B2, B3). The dependent variable is
reaction time (logRT). 

If I'm interested in the main effects of A and B, I run the following:

lmer(logRT~A+B+(1|Subject)+(1|Item), data)

This would give me something along these lines:

Fixed effects:
             Estimate Std. Error t value
(Intercept)  6.286297   0.023018  273.11
A2  		 0.007858   0.004204    1.87
B2          -0.017007   0.003689   -4.61
B3          -0.012179   0.003700   -3.29

If I understand correctly, the model here is evaluating A2 against A1, B2
against B1, and B3 against B1. This leads me to my first question: Is there
any way to find out if the main effect of B is significant?

Moving on with the same example, assume that I'm also interested in the
interaction between A and B. Specifically, I want to find out whether the
effect of A differs at the three levels of B. I run the following model:

lmer(logRT~A*B+(1|Subject)+(1|Item), data)

which would give me something like this:

Fixed effects:
                  Estimate Std. Error t value
(Intercept)       6.286656   0.023133  271.76
A2          	0.007149   0.006009    1.19
B2               -0.013616   0.005211   -2.61
B3               -0.016637   0.005225   -3.18
A2:B2 	     -0.006842   0.007377   -0.93
A2:B3 	      0.008973   0.007395    1.21

These are really hard tables to interpret. I believe we are now seeing the
difference between A1 and A2 at B1 (0.007149). Furthermore, the last two
lines tell us that at B2 the difference needs to be adjusted by -0.006842,
and at B3 it needs to be adjusted by 0.008973, and that these adjustments
are non-significant. This model doesn't provide information about the main
effects. If I wanted to report these, would I refer back to the first model?
And my third question: when we do ANOVAs, we're told to first see if the
interaction between A and B is significant, and only then look at the
interaction contrasts. Lmer in the above table gives you (some of) the
contrasts, but doesn't evaluate the interaction as a whole. Do we still need
to worry about the interaction as a whole, and if yes, how would we evaluate
it?

Many thanks in advance!

Jakke




More information about the R-lang mailing list