50% off: Unlimited data and AI learning.
The Learning Leader's Guide to AI Literacy

mi (version 0.10-2)

plot.mi: Diagnostic Plots for multiple imputation object

Description

Diagnostic plots for testing the fit of the imputation method to the observed data.

Usage

## S3 method for class 'mi,ANY':
plot(x, y, \dots)

plot.mi(x, y, m = 1, vrb = NULL, vrb.name = "Variable Score",
                    gray.scale = FALSE, mfrow=c( 1, 3 ), ...)

Arguments

x
mi object generated by the mi function.
y
currently not used.
...
Arguments for other methods, not used.
m
The m-th imputation. By default is 1.
vrb
A chosen variable for the scatter plot.
vrb.name
A name of the vrb variable.
gray.scale
When set to TRUE, makes the plot into gray scale with predefined color and line type.
mfrow
See par for details.

Value

  • Histograms, scatterplots, and residual plots of the fit of the imputation models. Binned residual plots are for each binary variable.

Details

For each variable, observed values are in blue, the imputed values are in red. In the scatterplot the observed and the imputed are plotted versus a variable the users can choose. By default the values are plotted against an index number but it strongly recommended to use a variable containing more information. Fitted lowess lines are also plotted for both observed and imputed data. A small amount of random noise (jittering) is added to the points so that they do not fall on top of each other.

References

Yu-Sung Su, Andrew Gelman, Jennifer Hill, Masanao Yajima. (2011). Multiple Imputation with Diagnostics (mi) in R: Opening Windows into the Black Box. Journal of Statistical Software 45(2). Kobi Abayomi, Andrew Gelman and Marc Levy. (2008). Diagnostics for multivariate imputations. Applied Statistics 57, Part 3: 273--291. Andrew Gelman and Jennifer Hill. (2007). Data Analysis Using Regression and Multilevel/Hierarchical Models. Cambridge University Press.

See Also

mi, mi.scatterplot, mi.hist

Examples

Run this code
### NOT RUN
#========================================================
#  data(CHAIN)
#  imp.CHAIN <- mi(CHAIN, n.iter=6, add.noise=FALSE)
#  plot(imp.CHAIN)
#========================================================

Run the code above in your browser using DataLab