[R-sig-ME] To conjoin or not to conjoin factorial variables?

Antoine Tremblay trea26 at gmail.com
Sat Oct 17 17:33:49 CEST 2009


Hello all,

We are interested in an interaction between FACTOR A (levels "a" and
"b"), FACTOR B (levels "c" and "d") and variable TIME (which we model
with a 5 knot restricted cubic spline). That is:

              m1=
lmer(LogRT~A*B*rcs(TIME,5)+(1|Subject)+(1|Item)+(1|TIME)+(0+TIME|Subject),data=dat).
              (1)

Because (i) plotLMER.fnc cannot plot 3-way interactions, and (ii) we
are unable to look at the contrasts of interest, which are ("ac" vs.
"bc"), ("ad" vs. "bd"), ("bc" vs. "bd"), and ("ac" vs. "ad"), we
decided to collapse factors A and B into a new variable ConjVar with 4
levels "ac", "ad", "bc", and "bd". The model thus becomes:

              m2=lmer(LogRT~ConjVar*rcs(TIME,5)+(1|Subject)+(1|Item)+(1|TIME)+(0+TIME|Subject),data=dat)
          (2)

We find significant differences in the first spline only between
levels "ac" and "bc", between "ad" and "bd", between "bc" and "bd",
but not between "ac" and "ad". Having the ConjVar also enables us to
plot the ConjVar*rcs(TIME,5) interaction with plotLMER.fnc():

              plotLMER.fnc(m2,pred="TIME",intr=list("ConjVar",levels(dat$ConjVar),"mid",list(1:4,rep(1,4))),lwd=2)
       (3)

Now, here comes the part we don't understand.

If we do "anova(m1)", the interaction A*B*rcs(TIME,5) is not
significant, but if we look at the table returned by "anova(m2)", then
the ConjVar*rcs(TIME,5) interaction is highly significant. The
questions we have are the following:

   (i)  Is it correct to conjoin factors A and B into ConjVar and run
our analyses using this variable?

   (ii) Why is the interaction A*B*rcs(TIME,5) not significant in (1)
but highly significant in (2)?

   (iii) Would the proper steps here rather be:
                        (I) run the model with A*B*rcs(TIME,5) and see
if this interaction is significant
                            (as shown in the "anova(m1)" table);
                        (II) and, if it is significant, then refit a
model with the conjoined variable ConjVar and
                             determine where the actual differences
are and plot them?

Thank you very much for your time,

--
Antoine Tremblay
Department of Neuroscience
Georgetown University
Washington DC




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