View source: R/imputeDiagnostics.R
imputeDiagnostics | R Documentation |
Performs multivariate imputation by chained equations and returns a set of diagnostic plots and statistics together with the imputations.
imputeDiagnostics(x = NULL, nSim = 10, transConst = 0.01, ...)
x |
list of class |
nSim |
integer, number of imputations, default is 10. |
transConst |
numeric scalar, |
... |
further arguments passed on to |
imputeDiagnostics
is essentially the same function as
imputeData
, but returns in addition the complete output from
mice::mice
as well as a series of diagnostic plots.
imputeData
will generally involve lengthy calculations where the
nSim
argument is set equal to the number of bootstrap samples in
subsequent calculation of an index using calculateIndex
.
imputeDiagnostics
is intended to be run before imputeData
,
allowing inspection of the diagnostics using a low value for nSim
,
and thus facilitating trial runs with different settings of input arguments
to mice::mice
.
A list of three elements:
identifiers
: a data.frame with variables relating each imputed
indicator observation to a missing observation in the data set x
.
imp
: list with 21 elements containing the complete output
from mice::mice
.
diagnostics
: list of diagnostic outputs including convergence
plots, stripplots showing the distribution of imputed and observed
values, and plots showing the distribution of missing values over years
and indicators.
Bård Pedersen
imputeData
and mice::mice
.
The vignette objectsInNIcalc
gives a detailed description of
niInput
lists.
## Not run:
imputeDiagnostics(x = themeData,
nSim = 10,
maxit = 100)$diagnostics
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.