-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
predictInterval: coefs[, 1:colIdx, lvl] : subscript out of bounds #101
Comments
Closed by #104 |
I'm having the same issue with this hypothetical model (same structure as what I am doing but reproducible):
This returns exactly the same error as above:
|
This is fixed in the development branch - an update will be pushed to CRAN soon. In the meantime, try installing the |
Actually the current dev version should work |
With the current dev version, I am now getting this error:
|
Huh. Thanks! I guess we're not indexing right in cases without intercepts. We will get this fixed soon. |
That fix solved the issue when a random effect for repeated measures is included in the model, however it's not working when I incorporate a random effect for nested experimental structure in addition to the repeated measures. For this example, I am supposing that the sleep study occurred in two different hospitals within two different cities:
This results in the same error as before:
|
Thanks - I don't encounter models like this so this is helpful. I'll push a fix up when I get a chance and ping you here to let you know when the dev version works. I've never really tested or supported nested specifications before so it may take me some time to make sure I'm addressing the random effect structure correctly. |
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
The text was updated successfully, but these errors were encountered: