This function "pools" (i.e. combines) multiple estimate_contrasts objects,
returned by estimate_contrasts(), in a similar fashion as mice::pool().
pool_contrasts(x, ...)A list of estimate_contrasts objects, as returned by
estimate_contrasts().
Currently not used.
A data frame with pooled comparisons or contrasts of predictions.
Averaging of parameters follows Rubin's rules (Rubin, 1987, p. 76).
Rubin, D.B. (1987). Multiple Imputation for Nonresponse in Surveys. New York: John Wiley and Sons.
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.93 | 1.97 | [-29.94, 20.07] | -2.51 | 0.242
#> 60-99 | 20-39 | -6.48 | 2.08 | [-32.86, 19.89] | -3.12 | 0.197
#> 60-99 | 40-59 | -1.55 | 2.23 | [-29.92, 26.81] | -0.70 | 0.613
#>
#> Variable predicted: bmi
#> Predictors contrasted: age
#> Predictors averaged: hyp, chl (1.9e+02)
#> p-values are uncorrected.