check.missing takes a data frame and compares the percentage of missing values pre and post-processing within one imputation function. If missing values are completely replaced by imputed values, the remaining percent missing should be 0, otherwise the user will see a warning indicating imputation wasn't performed or the regressors used in the model contained missing values.
Examples
set.seed(123)
data <- data.frame(x1 = stats::rnorm(100),x2 = stats::rnorm(100),y = stats::rnorm(100))
data$x1[sample(1:100, 20)] <- NA
data$x2[sample(1:100, 15)] <- NA
data$y[sample(1:100, 10)] <- NA
check.missing(data, data, verbose = TRUE)
#> Initial missing values: 45 (15.00%)
#> Remaining missing values: 45 (15.00%)
#> Warning: Initial missing: 15.00%. Remaining missing: 15.00%. Imputation not performed or missing values in the regressors.