Description Usage Arguments Value Warning
Imputes missing values with unknown or mode. The function also deletes the columns with missing values more than the specified cutoff
1 2 | mv_treatment_charvar(df, default = T, col.del_cutoff = 0.5,
char_var_list1 = "EMPTY_99", char_var_list2 = "EMPTY_99")
|
df |
The data frame on which the missing value treatment needs to be performed |
default |
T/F. For default = T, the function first drops the variables with missing value percentage more than col.del_cutoff and then imputes all the missing values with unknown |
col.del_cutoff |
Variables with missing value percentage greater than col.del_cutoff will be dropped. Default value is 50 percent |
char_var_list1 |
If default = F, then user need to specify the list of variables on which the imputation needs to be performed. In char_var_list1 user can speciy the variables where NA needs to be imputed with unknown |
char_var_list2 |
Specify the variables for which missing values needs to imputed with mode |
Output is the data set with missing values imputed
Enter only categorical variables in char_var_list1 and char_var_list1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.