Description Usage Arguments Value Author(s) See Also Examples
This function will call function 'impute_missing()' for several methods and return a table with some statistical information of the specified feature before and after imputation of different methods
1 | compare_model(df, feature, methods, missing_val_char)
|
df |
A dataset with missing values that needs to be imputed. |
feature |
(str) A string of column name, if the input data is a matrix, this should be a string like "Vn" where n is an integer representing the index of column |
methods |
(str or list)– the methods that users want to compare Supporting methods are: CC - Complete Case MIP - Imputation with mean value DIP - Imputation with median value |
missing_val_char |
A string of a missing value format: Supporting types are: NaN - Not a Number "" - Blank "?" - Question mark |
a summary table comparing the summary statistics: count, mean, std, min, 25%, 50%, 75%, max.
Duong Vu, 2018
na.omit
for the complete case
Other aggregate functions: impute_missing
1 | compare_model(data.frame(ex = c(1, 2, 3), bf = c(6, 8, "")), "bf", "DIP", "")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.