mice.impute.ranger: Random forest imputation using the ranger package

Description Usage Arguments Value

View source: R/mice.impute.ranger.R

Description

Designed as an alternative to the the "rf" method in the mice package. Imputes univariate missing data using random forests. It uses the same algorithm as "mice.impute.rf" (included in the mice package, but is much faster because it uses the ranger package. This function should not be called directly. Instead, call this function through mice() by specifying method = "ranger".

Usage

1
mice.impute.ranger(y, ry, x, ntree = 10, wy = NULL, type = NULL, ...)

Arguments

y

Vector to be imputed

ry

Logical vector of length length(y) marking observed values of y with TRUE and missing values of y with FALSE.

x

the matrix of predictors, without intercept

ntree

the number of trees for the random forest algorithm. Default is 10.

wy

Logical vector of length length(y). A TRUE value indicates locations in y for which imputations are created.

type

Not used. Needed for compatibility with mice

...

Other arguments passed to ranger()

Value

A vector of imputed values.


pewresearch/pewmethods documentation built on March 27, 2020, 7:22 p.m.