## Not run:
# #############################################################################
# # EXAMPLE 1: Hot deck imputation NHANES dataset
# #############################################################################
#
# data(nhanes, package="mice")
# dat <- nhanes
#
# #*** prepare imputation method
# vars <- colnames(dat)
# V <- length(vars)
# impMethod <- rep("hotDeck" , V)
# method <- "cor"
#
# #*** imputation in mice
# imp <- mice::mice( data=as.matrix(dat), m=1, imputationMethod=impMethod,
# method=method )
# summary(imp)
# ## End(Not run)
Run the code above in your browser using DataLab