The model based on the experiment looks like this:
glmer(Y ~ X*Condition + (X*Condition|subject) + (1+X|Trial)) # Y = logit variable # X = continuous variable # Condition = values A and B, dummy coded; the design is repeated # so all participants go through both Conditions # subject = random effects for different subjects # trial = random effects for different trials
Until now, I thought that the interpretation of the interaction and random effects is quite straightforward:
for fixed effects:
- Intercept - what is the Y value in Condition 0 when X is 0
- X - how much does Y change for a change of 1 unit in X in Condition 0
- ConditionB - what is the difference in Intercept for Condition B from Condition A
- X*ConditionB - what is the difference in slope for ConditionB from ConditionA
for random effects:
- random intercept - random variability around Intercept
- random X - random variability around X
- random ConditionB - random variability of the difference of intercepts between ConditionB and ConditionA
- random X*ConditionB - random variability of difference in slopes between ConditionB and ConditionA
However, I've read through a very well written chapter An Introduction to Mixed Models for Experimental Psychology by Henrik Singmann and David Kellen, where they say
In other words, a mixed model (or any other regression type model) that includes interactions with factors using treatment contrasts produces parameter estimates as well as Type III tests that often do not correspond to what one wants (e.g., main effects are not what is commonly understood as a main effect).
Using effects coding is suggested as a better way to interpret the interactions of continuous variable
X and categorical variable
Condition. I am aware that the random effects correlation in the upper case is somewhat hard to interpret - the correlation of Intercept and X is straightforward, but the correlation of X and X:ConditionB is not, because we correlate coefficients with differences from these coefficients. Then one needs to calculate the correlation per hand, as described in How to compute correlation of random slopes for X between two Conditions with (X*Condition|subject) model in lme4?
My questions are:
Is my interpretation of fixed and random effects valid? If not, why?
Why is effects coding better than dummy coding in mixed models, and how do you interpret effect coding?