information_value: Calculate the Information Value for a given variable and set...

Description Usage Arguments Details Value See Also


This function calculates the Weight of Evidence for each supplied bin using woe_single, then applies the formula for Information Value to the result. See the vignette for more details.


information_value(dat, var, bins = 0, response, warn = TRUE,
  auto_merge = FALSE)



The dataframe containing the input variable and response


Character string indicating the name of the variable


Numeric vector of cutpoints defining the bins for var, or 0, indicating that var is already binned


Character string indicating the name of the response


Logical- should the function print a warning if a given bin contains only one level of the response (and hence has a WOE of +/- Inf)? Recommended to keep this to TRUE; FALSE option is provided for using this function in programming


Logical. If bins contain only one value of the response, should they be merged with an adjacent bin? If set to TRUE and warn is set to FALSE, the function can modify your data without telling you- be careful


This function is designed as a helper, to be used in analyzing IV for a given binning structure or in applying an optimization routine to find optimal bins for variables in a dataset. When bins have only one level of the response, the WOE will be +/-; by default the function will not prevent this and issue a warning. You can turn off warnings and have the function auto-merge bins using the supplied options, but be sure to inspect the results carefully.


A single number giving the Information Value

See Also


Other metrics: woe_single

awstringer/innR2binnR documentation built on May 11, 2019, 4:11 p.m.