The goal of missMethods is to make the creation and handling of missing data as well as the evaluation of missing data methods easier.
You can install the released version of missMethods from CRAN with:
And the development version from GitHub with:
# install.packages("devtools") ::install_github("torockel/missMethods")devtools
missMethods mainly provides three types of functions:
delete_functions for generating missing values
impute_functions for imputing missing values
evaluate_functions for evaluating missing data methods
help(package = "missMethods") to see all functions.
More details for the
delete_ functions are given in a
This is a very basic workflow to generate missing values, impute the generated missing values and evaluate the imputation result:
library(missMethods) set.seed(123) <- data.frame(X = rnorm(100), Y = rnorm(100)) ds_comp <- delete_MCAR(ds_comp, 0.3) ds_mis <- impute_mean(ds_mis) ds_imp evaluate_imputed_values(ds_imp, ds_comp, "RMSE") #>  0.5328238