plotImputationVariance: plotImputationVariance

Description Usage Arguments Value Examples

View source: R/plotImputationVariance.R

Description

Plots the distribution of the difference between datasets of the imputed values. For categorical variables, the distribution of the number of distinct levels imputed for each sample is shown next to the distribution of unique draws from that variable in the nonmissing data, given that the draws were completely random. For numeric variables, the density of the standard deviation (between datasets) of imputations is plotted. The shaded area represents the samples that had a standard deviation lower than the total nonmissing standard deviation for the original data.

Usage

1
2
3
4
5
6
plotImputationVariance(
  miceObj,
  vars = names(miceObj$callParams$vars),
  monteCarloSimulations = 10000,
  ...
)

Arguments

miceObj

an object of class miceDefs, created by the miceRanger function.

vars

the variables you want to plot. Default is to plot all variables. Can be a vector of variable names, or one of 'allNumeric' or 'allCategorical'

monteCarloSimulations

The number of simulations to run to determine the distribution of unique categorical levels drawn if the draws were completely random.

...

additional parameters passed to ggarrange().

Value

an object of class ggarrange.

Examples

1
2
3
4
5
data("sampleMiceDefs")
plotImputationVariance(
  sampleMiceDefs
  , monteCarloSimulations = 100
)

miceRanger documentation built on Sept. 6, 2021, 5:07 p.m.