plot.vimmi: Diagnostic plots for a vimmi object

View source: R/vimmi.R

plot.vimmiR Documentation

Diagnostic plots for a vimmi object

Description

Draws mice-style multiple-imputation diagnostics for a vimmi object, for every numeric variable with imputed cells:

"chains"

convergence trace plots of the sequential (FCS) imputation: the mean and the standard deviation of the imputed values against the iteration number, one line per imputation. Chains that mix well fluctuate around a common level without trends; systematic drift suggests increasing nseq. Requires chain statistics (stored by vimpute() since VIM 7.3.0).

"density"

the density of the observed values (blue, bold) overlaid with the density of each imputation's imputed values (red, thin) – the analogue of mice::densityplot(). Imputed densities that deviate wildly from the observed one can flag model misfit (or genuine MAR shifts).

"strip"

every value as a point: column 0 holds the observed values (blue), columns 1..m the imputed values of each imputation (red) – the analogue of mice::stripplot().

Usage

## S3 method for class 'vimmi'
plot(x, y = c("chains", "density", "strip"), ...)

Arguments

x

A vimmi object created by vimpute() with m > 1

y

Type of diagnostic: "chains" (default), "density", or "strip"

...

Passed on to the underlying base-graphics calls

Value

x, invisibly

See Also

vimmi, vimpute

Examples

## Not run: 
result <- vimpute(sleep, method = "ranger", m = 5, seed = 1)
plot(result)             # convergence chains
plot(result, "density")  # observed vs imputed densities
plot(result, "strip")    # observed vs imputed values

## End(Not run)

VIM documentation built on Sept. 2, 2026, 5:07 p.m.