Wrapper Function to Imputation Methods in the simputation Package
This imputation method provides a wrapper function to univariate imputation methods in the simputation package.
mice.impute.simputation(y, ry, x, Fun=NULL, Fun_args=NULL, ... )
y |
Incomplete data vector of length |
ry |
Vector of missing data pattern ( |
x |
Matrix ( |
Fun |
Name of imputation functions in simputation package, e.g.,
|
Fun_args |
Optional argument list for |
... |
Further arguments to be passed |
Selection of imputation methods included in the simputation package:
linear regression: simputation::impute_lm
,
robist linear regression with M-estimators:
simputation::impute_rlm
,
regularized regression with lasso/elasticnet/ridge regression:
simputation::impute_en
,
CART models or random forests:
simputation::impute_cart
,
simputation::impute_rf
,
Hot deck imputation:
simputation::impute_rhd
,
simputation::impute_shd
,
Predictive mean matching:
simputation::impute_pmm
,
k-nearest neighbours imputation:
simputation::impute_knn
A vector of length nmis=sum(!ry)
with imputed values.
## Not run: ############################################################################# # EXAMPLE 1: Nhanes example ############################################################################# library(mice) library(simputation) data(nhanes, package="mice") dat <- nhanes #** imputation methods method <- c(age="",bmi="norm", hyp="norm", chl="simputation") Fun <- list( chl=simputation::impute_lm) Fun_args <- list( chl=list(add_residual="observed") ) #** do imputations imp <- mice::mice(dat, method=method, Fun=Fun, Fun_args=Fun_args) summary(imp) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.