Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mice.impute.simputation

Wrapper Function to Imputation Methods in the simputation Package


Description

This imputation method provides a wrapper function to univariate imputation methods in the simputation package.

Usage

mice.impute.simputation(y, ry, x, Fun=NULL, Fun_args=NULL, ... )

Arguments

y

Incomplete data vector of length n

ry

Vector of missing data pattern (FALSE – missing, TRUE – observed)

x

Matrix (n x p) of complete covariates.

Fun

Name of imputation functions in simputation package, e.g., imputeR::impute_lm, see Details.

Fun_args

Optional argument list for Fun

...

Further arguments to be passed

Details

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

Value

A vector of length nmis=sum(!ry) with imputed values.

Examples

## 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)

miceadds

Some Additional Multiple Imputation Functions, Especially for 'mice'

v3.11-6
GPL (>= 2)
Authors
Alexander Robitzsch [aut,cre] (<https://orcid.org/0000-0002-8226-3132>), Simon Grund [aut] (<https://orcid.org/0000-0002-1290-8986>), Thorsten Henke [ctb]
Initial release
2021-01-21 11:48:47

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.