mice.impute.hotDeck | R Documentation |
Imputes a variable under a random draw from a pool of donors defined by a distance function. Uncertainty with respect to the creation of donor pools is introduced by drawing a Bootstrap sample (approximate Bayesian Bootstrap, ABB) from observations with complete data (see Andridge & Little, 2010).
mice.impute.hotDeck(y, ry, x, donors=5, method="Mahalanobis", ...)
y |
Incomplete data vector of length |
ry |
Vector of missing data pattern ( |
x |
Matrix ( |
donors |
Number of donors used for random sampling of nearest neighbors in imputation |
method |
Method used for computation of weights in distance function.
Options are the Mahalanobis metric ( |
... |
Further arguments to be passed |
A vector of length nmis=sum(!ry)
with imputed values.
Andridge, R. R., & and Little, R. J. A. (2010). A review of hot deck imputation for survey non-response. International Statistical Review, 78(1), 40-64. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/j.1751-5823.2010.00103.x")}
See also the packages hot.deck and HotDeckImputation.
## 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, method=impMethod, method=method )
summary(imp)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.