Compare the observed and imputed values of either all of the continuous or all of the categorical variables used in an imputation.

observed_vs_imputed(
  object,
  data,
  type = c("categorical", "continuous"),
  labels = NULL
)

Arguments

object

An Hmisc::aregImpute object.

data

A dataset that was multiply imputed using multi_impute().

type

Whether to examine continuous or categorical data. Both cannot be assessed at the same time since they are different data types.

labels

Optional labels for the variables contained in the columns of data.

Value

An observed_vs_imputed object that inherits from dplyr::tibble containing the columns:

value

The value of a particular variable.

type

Either "Observed" or the imputation number (e.g., "Imputation 1", "Imputation 2", ...).

var

The name of the variable that was imputed.

label

A pretty label for the variable that was imputed.