Plots densities and barplots of the observed and imputed values in a long-format dataset (multiple imputed datasets stacked onto each other).#'
plot_imp_distr(data, imp = "Imputation_", id = ".id",
rownr = ".rownr", ncol = NULL, nrow = NULL)
a data.frame containing multiple imputations (and the original incomplete data)
the name of the variable specifying the imputation indicator
the name of the variable specifying the subject indicator
the name of a variable identifying which rows correspond to the same observation in the original (unimputed) data
optional number of rows and columns in the plot layout; automatically chosen if unspecified
optional number of rows and columns in the plot layout; automatically chosen if unspecified
# NOT RUN {
mod <- lme_imp(y ~ C1 + c2 + B2 + b2 + C2 + p2, random = ~ 1 | id, data = longDF,
n.iter = 300, monitor_params = c(imps = TRUE), mess = FALSE)
impDF <- get_MIdat(mod, m = 5)
plot_imp_distr(impDF, id = "id")
# }
Run the code above in your browser using DataLab