mr: calculate miss-classification error

Description Usage Arguments Value Examples

View source: R/funs.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
8
9
data(spect)
Detect(spect)
missdata <- SimIm(spect, 0.1)

sum(is.na(missdata))
# impute using rpart
impdata <- impute(missdata, cFun = "rpartC")
# calculate the misclassification error
mr(impdata$imp, missdata, spect)

imputeR documentation built on Jan. 21, 2020, 1:06 a.m.