Learn R Programming

imputeR (version 2.2)

mixError: Calculate mixed error when the imputed matrix is mixed type

Description

Calculate mixed error when the imputed matrix is mixed type

Usage

mixError(imp, mis, true, norm = TRUE)

Arguments

imp

the imputed matrix

mis

the original matrix with missing values

true

the true matrix

norm

logical, if TRUE, the nomailised RMSE will return for continous variables

Value

a vector of two values indicating the mixed error the the imputation, the first one if either RMSE or NRMSE, the second one is MCE.

Examples

Run this code
# NOT RUN {
data(tic)
Detect(tic)
missdata <- SimIm(tic, 0.3)
# }
# NOT RUN {
library(earth)
impdata <- impute(tic, lmFun = "earth", cFun = "rpartC")
mixError(impdata$imp, missdata, tic)
# }

Run the code above in your browser using DataLab