prediction
prediction copied to clipboard
Use `merTools::predictInterval()` for lmer/merMod models?
I wonder whether it would makesense to use predictInterval from merTools instead of the standard predict function? At present prediction returns NA for the fitted.se, but predictInterval would make this possible, and is also relatively fast:
https://cran.r-project.org/web/packages/merTools/vignettes/Using_predictInterval.html
Perhaps merTools could be an optional dependency, and if not present we'd fall back to the standard predict method?
Thanks. I'll investigate.
You could also take a look on a method from Ben Bolker, which would reduce dependencies on other packages: http://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#predictions-andor-confidence-or-prediction-intervals-on-predictions
However, this approach does not take the uncertainty of random effect into account.