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_contrastsobjects, 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)
#> Conditional Contrasts
#>
#> Level1 | Level2 | Difference | SE | 95% CI | t | df | p
#> -----------------------------------------------------------------------------
#> 40-59 | 20-39 | -4.59 | 2.07 | [ -9.39, 0.20] | -2.22 | 7.73 | 0.058
#> 60-99 | 20-39 | -6.34 | 2.15 | [-11.12, -1.57] | -2.94 | 10.46 | 0.014
#> 60-99 | 40-59 | -1.75 | 2.28 | [ -7.10, 3.60] | -0.77 | 7.33 | 0.468
#>
#> Variable predicted: bmi
#> Predictors contrasted: age
#> Predictors held at: chl (1.9e+02)
#> Predictors averaged over a balanced grid: hyp
#> p-values are uncorrected.
