-
-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Labels
Docs 📚Something to be adressed in docs and/or vignettesSomething to be adressed in docs and/or vignettesWhat's your opinion 🙉Collectively discuss somethingCollectively discuss something
Description
At the moment, confidence intervals around predicted values for lmerMod only take into account the fixed effects.
For example, in a model with Chick-level random intercepts and coefficients, each Chick will have intervals of the exact same width at every time point:
library(lme4)
library(insight)
fit1 <- lmer(
weight ~ 1 + Time + (1 + Time | Chick),
data = ChickWeight)
get_predicted(fit1, ci = .95) |>
cbind(ChickWeight) |>
within({CI_width = CI_high - CI_low}) |>
subset(Time == 4, select = "CI_width") |>
table()
#> CI_width
#> 4.1810057846375 4.18100578463751
#> 5 44I was chatting with @ASKurz and we were wondering if this is what most users would expect/want. In particular, it seems like many would want the random components to be accounted for in the computation. Should we supply CIs at all, issue a warning, or is the status quo just fine?
Curious what everyone thinks (and maybe especially @bwiernik )
ASKurz
Metadata
Metadata
Assignees
Labels
Docs 📚Something to be adressed in docs and/or vignettesSomething to be adressed in docs and/or vignettesWhat's your opinion 🙉Collectively discuss somethingCollectively discuss something