Imputation: 'Imputation'

View source: R/imputation.R

ImputationR Documentation

Imputation

Description

This is a wrapper for mice.

Usage

Imputation(
  data = NULL,
  formula = NULL,
  method = "try mice",
  m = 1,
  seed = 12321
)

Arguments

data

A data.frame.

formula

A formula. Where the formula contains a dependent variable, observations with missing values on this variable are deleted after the imputation (von Hippel 2007).

method

"mice" applies multivariate imputation by chained equations (predictive mean matching) with the mice package. "hot deck" applies the hot.deck method. The default setting is "try mice", which first applies the mice method and,if an error occurs, falls back to hot.deck.

m

Number of imputation samples.

seed

Seed used in random number generation.

Details

Variables with class "POSIXct" are converted to numeric and scaled prior to imputation. Variables with class "character" are converted to factor prior to imputation with blank (0-character) entries considered missing.

References

von Hippel, Paul T. 2007. "Regression With Missing Y's: An Improved Strategy for Analyzing Multiply Imputed Data." Sociological Methodology 37:83-117. Skyler J. Cranmer and Jeff Gill (2013). We Have to Be Discrete About This: A Non-Parametric Imputation Technique for Missing Categorical Data. British Journal of Political Science, 43, pp 425-449. Stef van Buuren and Karin Groothuis-Oudshoorn (2011), "mice: Multivariate Imputation by Chained Equations in R", Journal of Statistical Software, 45:3, 1-67.


NumbersInternational/flipImputation documentation built on Feb. 26, 2024, 5:37 a.m.