I am building a linear mixed effect model using the lmer function from the lme4 package in R but I am struggling to interpret the interactions terms in the model. I have used the following syntax:
mod2 <- lmer(post.diff ~ #my predicted DV
course * group
#my fixed effects
+ (1|bib)
#my random effects
, dat, REML = FALSE)
The two factors - course and group - are dummy coded variables. This gives me the following output:
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) -0.26080 0.18036 56.22506 -1.446 0.154
courseB 0.87647 0.09257 94.00000 9.468 2.49e-15 ***
courseC 2.38860 0.09257 94.00000 25.802 < 2e-16 ***
group1 -0.20996 0.26361 56.22506 -0.796 0.429
courseB:group1 0.09664 0.13531 94.00000 0.714 0.477
courseC:group1 0.10678 0.13531 94.00000 0.789 0.432
Using the anova() function, I can see that there is no main effect of group nor any interactions:
Type III Analysis of Variance Table with Satterthwaite's method
Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
course 142.305 71.152 2 94 664.1974 <2e-16 ***
group 0.034 0.034 1 47 0.3188 0.5750
course:group 0.081 0.041 2 94 0.3795 0.6853
Still, I want to better understand how I can interpret the output from my model. From my understanding:
-0.26080 (intercept) is the estimated mean for the group codes with 0 in course A
0.87647 is the estimated simple slope for the group codes with 0 in course B
2.38860 is the estimated simple slope for the group codes with 0 in course C
-0.20996 is the estimated simple slope for the group codes with 1 in course A
My question is how I should interpret the interactions terms in the model. I hope someone can help me so that I can see it an equation form.