mv_treatment_charvar: Performs missing value treatment for character variables by...

Description Usage Arguments Value Warning

View source: R/hello.R

Description

Imputes missing values with unknown or mode. The function also deletes the columns with missing values more than the specified cutoff

Usage

1
2
mv_treatment_charvar(df, default = T, col.del_cutoff = 0.5,
  char_var_list1 = "EMPTY_99", char_var_list2 = "EMPTY_99")

Arguments

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

Value

Output is the data set with missing values imputed

Warning

Enter only categorical variables in char_var_list1 and char_var_list1


saushe/RED documentation built on May 29, 2019, 3:20 p.m.