CDimpute {nftbart} | R Documentation |
Cold-deck missing imputation
Description
This function imputes missing data.
Usage
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 |
same |
Whether |