ls_MSE is a function that returns a list of MSE corresponding to the given list of imputed datasets. resample_method is needed because with 'bootstrap' method, we could have repeated lines in the imputed datasets, and with both 'jackknife' and 'bootstrap', the imputed datasets could not cover all the lines. With the purpose of giving every variable the same weight, we scale each variable with the mean and variance calculated from the complete dataset.

If the complete and imputed datasets are mix-typed, then only the numerical parts are taken into account.

ls_MSE(df_comp, ls_df_imp, mask, col_num_comp, resample_method = "bootstrap")

Arguments

df_comp

The original complete dataset.

ls_df_imp

List of imputed dataset.

mask

Mask of missingness (1 means missing value and 0 means observed value)

col_num_comp

Indices of numerical columns in the complete dataset

resample_method

Default value is 'bootstrap', could also be 'jackknife' or 'none'.

Value

list_MSE List of MSE corresponding to the given list of imputed datasets. Mean_MSE Mean value of MSE. Variance_MSE Variance of MSE. list_MSE_scale List of scaled MSE corresponding to the given list of imputed datasets. Before performing the calculation of MSE, the imputed data set and complete dataset are both scaled with Min-Max scale using the parameter from complete dataset. Mean_MSE_scale Mean value of scaled MSE. Variance_MSE Variance of scaled MSE.