Learn R Programming

imputeR (version 2.2)

mr: calculate miss-classification error

Description

This function calculates the misclassfication error given the imputed data, the missing data and the true data.

Usage

mr(imp, mis, true)

Arguments

imp

the imputaed data matrix

mis

the missing data matrix

true

the ture data matrix

Value

The missclassification error

Examples

Run this code
# NOT RUN {
data(spect)
Detect(spect)
missdata <- SimIm(spect, 0.1)
# }
# NOT RUN {
sum(is.na(missdata))
# impute using rpart
impdata <- impute(missdata, cFun = "rpartC")
# calculate the misclassification error
mr(impdata$imp, missdata, spect)
# }

Run the code above in your browser using DataLab