# Imputation of Missing Data at Level 2 In mitml: Tools for Multiple Imputation in Multilevel Modeling

library(knitr)
set.seed(123)
options(width=87)

## Completing the data

The completed data sets can then be extracted with mitmlComplete.

implist <- mitmlComplete(imp, "all")


When inspecting the completed data, it is easy to verify that the imputations for variables at Level 2 are constant within groups as intended, thus preserving the two-level structure of the data.

implist[[1]][73:78,]

###### References

Enders, C. K., Mistler, S. A., & Keller, B. T. (2016). Multilevel multiple imputation: A review and evaluation of joint modeling and chained equations imputation. Psychological Methods, 21, 222–240. doi: 10.1037/met0000063 (Link)

Goldstein, H., Carpenter, J. R., Kenward, M. G., & Levin, K. A. (2009). Multilevel models with multivariate mixed response types. Statistical Modelling, 9, 173–197. doi: 10.1177/1471082X0800900301 (Link)

Grund, S., Lüdtke, O., & Robitzsch, A. (in press). Multiple imputation of missing data for multilevel models: Simulations and recommendations. Organizational Research Methods. doi: 10.1177/1094428117703686 (Link)

cat("Author: Simon Grund (grund@ipn.uni-kiel.de)\nDate:  ", as.character(Sys.Date()))


## Try the mitml package in your browser

Any scripts or data that you put into this service are public.

mitml documentation built on Oct. 5, 2021, 5:07 p.m.