I’m analysing data with mixed-models (using the
afex package which I believe is based on
lme4) from an experiment that had a (continuous-type) score as the dependent variable.
I used a factorial design; the fixed-effects were 3 subject variables (
z3; all continuous and centred), and 2 within-subjects experimental manipulations (one dichotomous
x1, the other with three levels
x2). My uncorrelated random effects were the participants [ID].
Upon running my mixed model (
y ~ x1 + x2 + z1 + z2 + z3 + x1:x2 + x2:z1 + x2:z2 + (1|ID)) I found an interaction between one of the subject variables [
z1] and one of the within-subject manipulations [
x2]. Fixed effects can be seen below:
Estimate Std. Error t value (Intercept) 1.718e-02 6.356e-02 0.270 x1b 2.577e-01 3.423e-02 7.531 x2b -5.242e-02 4.999e-02 -1.048 x2c 9.705e-03 4.999e-02 0.194 z1 -2.254e-01 2.335e-01 -0.965 z2 1.235e-01 2.282e-01 0.541 z3 2.242e-01 3.911e-02 5.734 x1b:x2b -1.253e-01 4.840e-02 -2.588 x1b:x2c 2.187e-01 4.840e-02 4.518 x2b:z1 -8.068e-01 1.861e-01 -4.335 x2c:z1 2.709e-01 1.861e-01 1.456 x2b:z2 5.806e-01 1.668e-01 3.480 x2c:z2 -1.065e-01 1.668e-01 -0.639
A quick scatterplot for this interaction appears to show that
x2b has the flattest slope and
x2c has the steepest:
When I use
lstrend to try and interpret the interaction, it tells me that level
a has a different slope from levels
c, and that only level
a had a significant slope. The
lsmeans(model.mixed.optim, "x2", by = "z1", at = list("z1" = c(summary(data$z1)[],summary(data$z1)[]))) # compare 1st and 3rd quartiles
I was perplexed as to how this could be the case, until I looked at the least-squares means using
I have a few questions:
lsmeansthe correct way to analyse a mixed-model continuous-categorical interaction?
Can anyone tell me why the second plot is so different to the first (I know I'm plotting lsmeans vs scatter, but I would have thought they would match up at least a little) -- is this a consequence of specifying participant ID as a random effect?
Does anyone have recommended descriptives when reporting the outcome of a mixed model (as I would guess means are not appropriate)?