# NOT RUN {
library(parameters)
if (require("mice")) {
data(nhanes2)
imp <- mice(nhanes2)
fit <- with(data = imp, exp = lm(bmi ~ age + hyp + chl))
model_parameters(fit)
}
# }
# NOT RUN {
# model_parameters() also works for models that have no "tidy"-method in mice
if (require("mice") && require("gee")) {
data(warpbreaks)
set.seed(1234)
warpbreaks$tension[sample(1:nrow(warpbreaks), size = 10)] <- NA
imp <- mice(warpbreaks)
fit <- with(data = imp, expr = gee(breaks ~ tension, id = wool))
# does not work:
# summary(pool(fit))
model_parameters(fit)
}
# }
# NOT RUN {
# and it works with pooled results
if (require("mice")) {
data("nhanes2")
imp <- mice(nhanes2)
fit <- with(data = imp, exp = lm(bmi ~ age + hyp + chl))
pooled <- pool(fit)
model_parameters(pooled)
}
# }
Run the code above in your browser using DataLab