Below follows a hypothetical but reproducible example to generate this error. In this example the model does not make any sense but in my case this model does but I cannot share the data.
Image we take the sleepstudy data from lme4, and we define a binary Test variable for each subject which is randomly set to TRUE/FALSE:
sleepstudy$Test <- rep(sample(c(TRUE, FALSE), length(unique(sleepstudy$Subject)), replace = TRUE), each = 10)
Now we fit the following (nonsensical) model:
lmer.sleep <- lmer(Reaction ~ Days:Test + (0 + Days | Subject), data = sleepstudy2)
Then if I use the predictInterval function like so:
predictInterval(lmer.sleep, newdata = sleepstudy)
I get the following error:
Error in coefs[, 1:colIdx, lvl] : subscript out of bounds