if (FALSE) {
# fit a model and monitor the imputed values with
# monitor_params = c(imps = TRUE)
mod <- lm_imp(y ~ C1 + C2 + M2, data = wideDF,
monitor_params = c(imps = TRUE), n.iter = 100)
# Example 1: without export to SPSS
MIs <- get_MIdat(mod, m = 3, seed = 123)
# Example 2: with export for SPSS
# (here: to the temporary directory "temp_dir")
temp_dir <- tempdir()
MIs <- get_MIdat(mod, m = 3, seed = 123, resdir = temp_dir,
filename = "example_imputation",
export_to_SPSS = TRUE)
}
Run the code above in your browser using DataLab