Learn R Programming

imputeR (version 2.2)

Rmse: calculate the RMSE or NRMSE

Description

This function calculate imputation error given the imputed data, the missing data and the true data

Usage

Rmse(imp, mis, true, norm = FALSE)

Arguments

imp

the imputaed data matrix

mis

the missing data matrix

true

the true data matrix

norm

logical, if TRUE then the normalized RMSE will be returned

Value

the RMSE or NRMSE

See Also

impute for the main imputation function, mr for the misclassification error metric.

Examples

Run this code
# NOT RUN {
data(parkinson)
# introduce 10% random missing values into the parkinson data
missdata <- SimIm(parkinson, 0.1)

# impute the missing values by LASSO
# }
# NOT RUN {
impdata <- impute(missdata, lmFun = "lassoR")

# calculate the normalised RMSE for the imputation
Rmse(impdata$imp, missdata, parkinson, norm = TRUE)
# }

Run the code above in your browser using DataLab