if (FALSE) {
# 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
}
Run the code above in your browser using DataLab