Learn R Programming

VIM (version 7.3.0)

regressionImp: Regression Imputation (via vimpute)

Description

Impute missing values based on a regression / classification model.

Usage

regressionImp(
  formula,
  data,
  family = "AUTO",
  robust = FALSE,
  imp_var = TRUE,
  imp_suffix = "imp",
  mod_cat = FALSE
)

Value

the imputed data set (same class as data)

Arguments

formula

model formula to impute one variable

data

A data.frame containing the data

family

ignored in this wrapper version (only "AUTO"-like behaviour via vimpute)

robust

logical; if TRUE use method = "robust", otherwise "regularized"

imp_var

logical; if TRUE create TRUE/FALSE variables indicating imputation status

imp_suffix

suffix used for TF imputation variables

mod_cat

ignored in this wrapper version (classification handled by vimpute)

Details

By default (lm() for numeric responses and glm() for binary responses, with any number of predictors) the imputation is deterministic and matches a plain regression fit. When the design is rank-deficient (collinear predictors or \(p \ge n\)) or the response is a multi-level factor, it falls back to the regularized (glmnet) path via vimpute() with method = "regularized". If robust = TRUE, vimpute() with method = "robust" (lmrob() / glmrob()) is used.

See Also

Other imputation methods: hotdeck(), impPCA(), imputeCellEM(), imputeCellIRMI(), imputeCellM(), imputeCellMCD(), imputeCellwise(), imputeRobust(), imputeRobustChain(), irmi(), kNN(), matchImpute(), medianSamp(), rangerImpute(), sampleCat(), vimmi, vimpute(), xgboostImpute()