prediction icon indicating copy to clipboard operation
prediction copied to clipboard

Use `merTools::predictInterval()` for lmer/merMod models?

Open benwhalley opened this issue 8 years ago • 2 comments
trafficstars

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?

benwhalley avatar Feb 07 '17 23:02 benwhalley

Thanks. I'll investigate.

leeper avatar Feb 08 '17 07:02 leeper

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.

strengejacke avatar Apr 04 '18 11:04 strengejacke