Learn R Programming

mice (version 2.30)

mice.impute.cart: Imputation by classification and regression trees

Description

Imputes univariate missing data using classification and regression trees.

Usage

mice.impute.cart(y, ry, x, minbucket = 5, cp = 1e-04, ...)

Arguments

y

Numeric vector with incomplete data

ry

Response pattern of y (TRUE = observed, FALSE = missing)

x

Design matrix with length(y) rows and p columns containing complete covariates.

minbucket

The minimum number of observations in any terminal node used. See rpart.control for details.

cp

Complexity parameter. Any split that does not decrease the overall lack of fit by a factor of cp is not attempted. See rpart.control for details.

...

Other named arguments passed down to rpart().

Value

Numeric vector of length sum(!ry) with imputations

Details

Imputation of y by classification and regression trees. The procedure is as follows:

  1. Fit a classification or regression tree by recursive partitioning;

  2. For each ymis, find the terminal node they end up according to the fitted tree;

  3. Make a random draw among the member in the node, and take the observed value from that draw as the imputation.

References

Doove, L.L., van Buuren, S., Dusseldorp, E. (2014), Recursive partitioning for missing data imputation in the presence of interaction Effects. Computational Statistics \& Data Analysis, 72, 92-104.

Breiman, L., Friedman, J. H., Olshen, R. A., and Stone, C. J. (1984), Classification and regression trees, Monterey, CA: Wadsworth & Brooks/Cole Advanced Books & Software.

Van Buuren, S.(2012), Flexible imputation of missing data, Boca Raton, FL: Chapman & Hall/CRC.

See Also

mice, mice.impute.rf, rpart, rpart.control

Examples

Run this code
# NOT RUN {
require(rpart)
require(lattice)

imp <- mice(nhanes2, meth = "cart", minbucket = 4)
plot(imp)

# }

Run the code above in your browser using DataLab