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

Antoine Tremblay trea26 at gmail.com
Sun Oct 18 14:39:59 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:


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:


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():


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