This function "pools" (i.e. combines) multiple estimate_contrasts
objects,
returned by estimate_contrasts()
, in a similar fashion as mice::pool()
.
Arguments
- x
A list of
estimate_contrasts
objects, as returned byestimate_contrasts()
.- ...
Currently not used.
References
Rubin, D.B. (1987). Multiple Imputation for Nonresponse in Surveys. New York: John Wiley and Sons.
Examples
data("nhanes2", package = "mice")
imp <- mice::mice(nhanes2, printFlag = FALSE)
comparisons <- lapply(1:5, function(i) {
m <- lm(bmi ~ age + hyp + chl, data = mice::complete(imp, action = i))
estimate_contrasts(m, "age")
})
pool_contrasts(comparisons)
#> Marginal Contrasts Analysis
#>
#> Level1 | Level2 | Difference | SE | 95% CI | t(1) | p
#> ---------------------------------------------------------------------
#> 40-59 | 20-39 | -4.56 | 2.20 | [ -9.15, 0.03] | -2.93 | 0.008
#> 60-99 | 20-39 | -6.49 | 2.70 | [-12.12, -0.86] | -3.68 | 0.001
#> 60-99 | 40-59 | -1.93 | 2.17 | [ -6.47, 2.60] | -1.29 | 0.212
#>
#> Variable predicted: bmi
#> Predictors contrasted: age
#> Predictors averaged: hyp, chl (2e+02)
#> p-values are uncorrected.
#>