merTools predictInterval() for model with nested random effect

余生颓废 提交于 2019-12-01 13:00:14

One can (apparently) work around this by writing out the interaction term explicitly. Warning: I haven't actually checked to make sure the resulting predictions are correct, just seen that no error is produced and the resulting object is approximately sensible ...

msleep <- transform(msleep,voreOrder=interaction(vore,order,drop=TRUE))
mod2 <- lmer(sleep_total ~ bodywt + (1|vore)+(1|voreOrder), data=msleep)
predInt <- predictInterval(merMod=mod2, newdata=msleep) 

This does generate warning messages, but apparently they're due to <NA> values in the vore variable (I don't know this data set ...)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!