| vimmi | R Documentation |
S3 class for storing multiple imputations from vimpute.
Stores the original data once and only the imputed values per variable per
imputation, for memory efficiency.
## S3 method for class 'vimmi'
print(x, ...)
## S3 method for class 'vimmi'
summary(object, ...)
x |
A |
... |
Currently unused |
object |
A |
A vimmi object is returned by vimpute when m > 1.
It contains:
dataThe original data.frame with NAs intact (stored once).
impNamed list: for each variable with missings, a data.frame
with nmis rows and m columns of imputed values.
whereLogical matrix indicating which cells were imputed.
mInteger: number of imputations.
nmisNamed integer vector of missing counts per variable.
methodNamed list of imputation methods used per variable.
bootLogical: was bootstrap resampling used?
uncertCharacter: uncertainty method used.
callThe original function call.
tuning_logTuning report of the (single) tuning run, or NULL.
chainPer-iteration chain statistics (mean/var
arrays [variable, iteration, imputation]) behind
plot.vimmi trace plots.
seedThe seed applied at entry, or NULL.
Use vim_complete to extract completed datasets,
with.vimmi to fit models across imputations (returns a
mice-compatible mira), vim_as_mids to convert to a
mice mids object for pooling with mice::pool(), and
plot.vimmi for convergence trace plots.
Matthias Templ
vimpute, vim_complete,
with.vimmi, vim_as_mids,
plot.vimmi
Other imputation methods:
hotdeck(),
impPCA(),
imputeCellEM(),
imputeCellIRMI(),
imputeCellM(),
imputeCellMCD(),
imputeCellwise(),
imputeRobust(),
imputeRobustChain(),
irmi(),
kNN(),
matchImpute(),
medianSamp(),
rangerImpute(),
regressionImp(),
sampleCat(),
vimpute(),
xgboostImpute()
## Not run:
# Multiple imputation with bootstrap and normal error uncertainty
result <- vimpute(sleep, method = "ranger", m = 5,
boot = TRUE, uncert = "normalerror")
print(result)
summary(result)
# Extract completed datasets
d1 <- vim_complete(result, 1)
all_d <- vim_complete(result, "all")
# complete(result, 1) does the same when mice or tidyr is attached
# Fit models and pool
fits <- with(result, lm(Sleep ~ Dream + Span))
# mice::pool(fits) # requires mice
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.