| vim_as_mids | R Documentation |
Converts a vimmi object to long format and uses
mice::as.mids() to create a proper mids object.
This enables use of mice::pool(), mice::with.mids(),
and other mice infrastructure.
vim_as_mids(x, ...)
as.mids.vimmi(x, ...)
x |
A |
... |
Currently unused |
vim_as_mids() is the documented name. as.mids.vimmi() is the
same function under its historical name (kept for backward compatibility):
despite the dotted suffix it is a plain function, not an S3 method –
mice::as.mids() is not a generic, so it never dispatches on
vimmi objects.
A mids object (from the mice package)
## Not run:
result <- vimpute(sleep, method = "ranger", m = 5,
boot = TRUE, uncert = "normalerror")
mids_obj <- vim_as_mids(result)
# Now use mice infrastructure:
# fits <- with(mids_obj, lm(Sleep ~ Dream + Span))
# mice::pool(fits)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.