This function "pools" (i.e. combines) multiple ggeffects
objects, in
a similar fashion as mice::pool()
.
Arguments
- x
A list of
ggeffects
objects, as returned bypredict_response()
.- ...
Currently not used.
References
Rubin, D.B. (1987). Multiple Imputation for Nonresponse in Surveys. New York: John Wiley and Sons.
Examples
# example for multiple imputed datasets
data("nhanes2", package = "mice")
imp <- mice::mice(nhanes2, printFlag = FALSE)
predictions <- lapply(1:5, function(i) {
m <- lm(bmi ~ age + hyp + chl, data = mice::complete(imp, action = i))
predict_response(m, "age")
})
pool_predictions(predictions)
#> # Predicted values of bmi
#>
#> age | Predicted | 95% CI
#> --------------------------------
#> 20-39 | 29.42 | 26.87, 31.97
#> 40-59 | 23.96 | 20.95, 26.98
#> 60-99 | 22.60 | 19.32, 25.89
#>
#> Adjusted for:
#> * hyp = no
#> * chl = 194.64