| with.vimmi | R Documentation |
Applies an expression (typically a model fit) to each completed dataset
in a vimmi object. The return is a mice-compatible mira
object (elements call, call1, nmis, analyses),
so the standard mice pipeline runs unchanged: mice::pool(),
summary(mice::pool(fits)), mice::getfit(fits). The mice
package is not needed to create the object, only to pool it; for
mitools::MIcombine() pass the fit list fits$analyses.
## S3 method for class 'vimmi'
with(data, expr, ...)
data |
A |
expr |
An expression to evaluate, e.g. |
... |
Currently unused |
An object of class mira: the m results are in
$analyses (extract with mice::getfit())
## Not run:
result <- vimpute(sleep, method = "ranger", m = 5, boot = TRUE, uncert = "normalerror")
fits <- with(result, lm(Sleep ~ Dream + Span))
# Pool with mice:
# mice::pool(fits)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.