Pool contrasts and comparisons from test_predictions()
Source: R/pool_comparisons.R
pool_comparisons.Rd
This function "pools" (i.e. combines) multiple ggcomparisons
objects, returned
by test_predictions()
, in a similar fashion as mice::pool()
.
Arguments
- x
A list of
ggcomparisons
objects, as returned bytest_predictions()
.- ...
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))
test_predictions(m, "age")
})
pool_comparisons(comparisons)
#> # Pairwise comparisons
#>
#> age | Contrast | 95% CI | p
#> ----------------------------------------------
#> 20-39-40-59 | 5.84 | 1.47, 10.22 | < .001
#> 20-39-60-99 | 7.22 | 2.09, 12.34 | < .001
#> 40-59-60-99 | 1.37 | -2.79, 5.53 | 0.404