0
$\begingroup$

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

But i don't understand difference of models like

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

and

    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 !

$\endgroup$
0
$\begingroup$

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 https://stackoverflow.com/questions/40567421/vs-in-r-for-modelling)

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

| cite | improve this answer | |
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.