Mixed effects modelling; what to do when model is over-specified? I'm trying to use mixed-effects modelling to analyse some data. There are a number of variables that I need to specify within the model, two of which are between-participants (x1 and x2) and two of which are repeated-measures (z1 and z2). I'm interested in individual differences both generally and in relation to the repeated-measure variables.
From what I understand, according to Barr's (2012) 'Keep it maximal' paper, the lmer syntax should be:
y ~ x1*x2*z1*z2+ (1+(z1*z2)|ID)

When I try to run this in R, it fails, I think the error message is telling me that I've over-specified the model:
Error in checkZdims(reTrms$Ztlist, n = n, control, allow.n = FALSE) : 
number of observations (=289) <= number of random effects (=292) for term ((z1 * z2) | ID); the random-effects parameters and the residual variance (or scale parameter) are probably unidentifiable

Is there a way to maximally specify my model, or do I need to restrict my random effects term? If so, what would the new term be?
 A: The Keep it maximal proposal is not to be taken as a dogma. Be more pragmatic, and try to determine what level of model complexity your data will support (or at least a maximal level that will be supported).
Computationally speaking: The IWRLS estimation procedure used might not converge to the optimal parameter values;  as a result your inference will be wrong. In addition, a large number of parameters in a model may results in a very flat (conceptually speaking) log-likelihood surface and as a consequence the optimization problem you were previously solving "easily" just become extremely hairy.
The reasonable thing to do is to reduce the number of groups you are estimating. Right now you have an over-parametrized LME models; as you assume a model $y\sim N(X\beta,ZDZ^T+\sigma^2I)$ what is written essentially has more variance parameters than data-points.
Check for starters something like: y ~ x1*x2*z1*z2+ (1+z1|ID) + (1+z2|ID)) if you feel you should have correlated random slopes and intercepts in your model. This is already quite explicit for a covariance structure anyway. You can modify the model later if it does not fit your modeling assumptions.
And to get back to you original final question: No, there is no way to automatically specify the maximal random effects structure of your model; unfortunately there is no $silver$ $bullet$ for that statistical question.
