Consolidates several different imputation methods inlcuding summary statistics
impute_summary(df)
df | dataframe containing missing values to impute |
---|
a list object with attributes containing summary statistics and imputed data of different methods
df <- data.frame(one = rnorm(20, 3, 10), two = rnorm(20, 1, 5), three = rnorm(20, 10, 2), four = rnorm(20, 20, 6)) df[c(3:5,15, 19), "two"] <- NA df[c(2, 8:10), "three"] <- NA df[c(3:8, 17), "four"] <- NA summary_doc <- impute_summary(df)#> #> iter imp variable #> 1 1 two three four #> 2 1 two three four #> 3 1 two three four #> 4 1 two three four #> 5 1 two three four #> missForest iteration 1 in progress...done! #> missForest iteration 2 in progress...done! #> missForest iteration 3 in progress...done! #> missForest iteration 4 in progress...done! #> missForest iteration 5 in progress...done! #> missForest iteration 6 in progress...done!na_counts <- summary_doc$nan_counts na_row_locations <- summary_doc$nan_rowindex imputed_df_method_1 <- summary_doc$hmisc_mean