with.vimmi: Evaluate an expression across all imputations
Description
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.
Usage
# S3 method for vimmi
with(data, expr, ...)
Value
An object of class mira: the m results are in
$analyses (extract with mice::getfit())