View source: R/regressionImp.R
| regressionImp | R Documentation |
Impute missing values based on a regression / classification model.
regressionImp(
formula,
data,
family = "AUTO",
robust = FALSE,
imp_var = TRUE,
imp_suffix = "imp",
mod_cat = FALSE
)
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) |
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.
the imputed data set (same class as data)
Other imputation methods:
hotdeck(),
impPCA(),
imputeCellEM(),
imputeCellIRMI(),
imputeCellM(),
imputeCellMCD(),
imputeCellwise(),
imputeRobust(),
imputeRobustChain(),
irmi(),
kNN(),
matchImpute(),
medianSamp(),
rangerImpute(),
sampleCat(),
vimmi,
vimpute(),
xgboostImpute()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.