[R-sig-ME] Using broom.mixed library with lme4
Simon Harmel
@|m@h@rme| @end|ng |rom gm@||@com
Tue Nov 10 07:17:29 CET 2020
Dear All,
Belwo, I've used library `broom.mixed` and imputed some data with library
`mice` to then fit a "random-intercept" `lmer()` model.
BUT I wonder why after I `pool()` my analyses, there is an extra "ubar"
(random-effect) for slope (`sex`) which is not even in the model?!
library(mice)
library(lme4)
library(broom.mixed)
imp <- mice(popmis, m = 5) # `popmis` is a dataset from `mice`
fit <- with(data = imp, exp = lme4::lmer(popular ~ sex + (1|school)))
pool(fit)
### `ubar` is the random effect for intercept (0.007524509) BUT WHY we see
a ubar ALSO for `sex` (0.001177781)?
Class: mipo m = 5
term m estimate ubar b t dfcom
df
1 (Intercept) 5 4.9007789 0.007524509 0.0004845564 0.008105977 1996
547.44383
2 sex 5 0.8617941 0.001177781 0.0015867795 0.003081916 1996
10.33653
riv lambda fmi
1 0.0772765 0.07173321 0.0751060
2 1.6167147 0.61784141 0.6751515
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list