Solved – the differences of interaction mark in lme4


I want to make a model including interaction term of factor 1 and factor 2.

But i don't understand difference of models

    m <- lmer(RT ~ fac1 * fac2 + (1+fac1*fac2|subject), data = df)


    m<- lmer(RT ~ fac1 : fac2 + (1|subject) + (fac1:subject) + (fac2:subject), data = df)

which one is right for making interaction term
and what is difference between them ?

thanks for reading !

Best Answer

The colon : indicates a multiplicative term (an interaction).

The asterisk * automatically includes both the interaction and the main effects: a * b is interpreted the same way as a + b + a:b (See

You typically should start with the asterisk a * b or the full expression (a + b + a:b), but there may be occasional exceptions -- see Including the interaction but not the main effects in a model

Related Question