What is the maximal linear mixed effects model of a 2 x 2 within-subject and within-item factorial design with multiple observations for each subject-item-factor level combination: m1 (as I have seen quite often) but why not m2 or even m3?

m1: Y ~ 1 + A*B + (1 + A*B|subject) + (1 + A*B|item)

m2: Y ~ 1 + A*B + (1 + A*B|subject) + (1 + A*B|item) + (1|subject:item)

m3: Y ~ 1 + A*B + (1 + A*B|subject) + (1 + A*B|item) + (1 + A*B|subject:item)

I know that these models are often over-parameterized but if one wants to start with the maximal model and try to find an 'optimal' model via reduction, then it should be the correct maximal model in the first place.


Models m2 and m3 can only be estimated if you have repetitions on the level of the participant-item combination. For m3 for the full factorial design. Otherwise this random effect is confounded with the residual variance.

In our recent chapter we wrote the following about this issue (in footnote 6):

If we had replicates for each combination of participant and item, we could additionally estimate random effects for the random effects grouping factor resulting from the participant-by-item interaction, potentially with random slopes for all fixed effects. With such data, such a model would constitute the maximal model. As the example experiment however did not include this data, this effect is confounded with the residual variance and cannot be estimated.

To sum this up, for this and all other random effect parameter you need more than one data point for each level of the random-effect grouping factor and fixed-effect factor. Otherwise it cannot be estimated. lme4 will also produce a corresponding error and not estimate such a model.

  • $\begingroup$ Thanks, that's in line with my (limited) understanding. Can you elaborate on the fact that the random effect is confounded with the residual variance otherwise (i.e. what does this mean)? I could also ask this as a separate question if you think that's a better idea.. $\endgroup$
    – statmerkur
    Jan 27 '18 at 15:18
  • $\begingroup$ Maybe the following link helps: singmann.org/… $\endgroup$
    – Henrik
    Jan 27 '18 at 17:50
  • 1
    $\begingroup$ You need at least one independent data point to identify each free parameter. In this case you would have one more parameters than data points (the residual variance). Then your model parameters are not identified. In other words, the random effects are confounded with the variance. It is all about counting parameters. $\endgroup$
    – Henrik
    Jan 27 '18 at 23:02
  • $\begingroup$ Does this also apply to continuous covariates? I.e., how many data points are needed to estimate random intercepts and/or random slopes for a continuous covariate? $\endgroup$
    – statmerkur
    Feb 3 '18 at 21:25
  • $\begingroup$ This applies exactly in the same manner for continuous covariates. With only one data point you cannot estimate a random slope. Note however that you probably want more than just the necessary number for estimating the continuous random slope in a reasonable manner. $\endgroup$
    – Henrik
    Feb 3 '18 at 23:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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