CDimpute: Cold-deck missing imputation

Description Usage Arguments Details Value

View source: R/CDimpute.R

Description

This function imputes missing data.

Usage

1
CDimpute(x.train, x.test=matrix(0, 0, 0), impute.bin=NULL)

Arguments

x.train

The training matrix.

x.test

The testing matrix, if given.

impute.bin

An index of the columns to avoid imputing which will be handled by BART internally.

Details

We call this method cold-decking in analogy to hot-decking. Hot-decking was a method commonly employed with US Census data in the early computing era. For a particular respondent, missing data was imputed by randomly selecting from the responses of their neighbors since it is assumed that the values are likely similar. In our case, we make no assumptions about which values may, or may not, be nearby. We simply take a random sample from the matrix rows to impute the missing data. If the training and testing matrices are the same, then they receive the same imputation.

Value

x.train

The imputed training matrix.

x.test

The imputed testing matrix.

miss.train

A summary of the missing variables for training.

miss.test

A summary of the missing variables for testing.

impute.flag

Whether impute.bin columns were, or were not, imputed.

same

Whether x.train and x.test are identical.


nftbart documentation built on Dec. 20, 2021, 5:08 p.m.

Related to CDimpute in nftbart...