pool_comparisons: Pool contrasts and comparisons from 'test_predictions()'

View source: R/pool_comparisons.R

pool_comparisonsR Documentation

Pool contrasts and comparisons from test_predictions()

Description

This function "pools" (i.e. combines) multiple ggcomparisons objects, returned by test_predictions(), in a similar fashion as mice::pool().

Usage

pool_comparisons(x, ...)

Arguments

x

A list of ggcomparisons objects, as returned by test_predictions().

...

Currently not used.

Details

Averaging of parameters follows Rubin's rules (Rubin, 1987, p. 76).

Value

A data frame with pooled comparisons or contrasts of predictions.

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)


strengejacke/ggeffects documentation built on May 28, 2024, 8:26 p.m.