Weight of evidence and information value for categorical data.

rbin_factor(data = NULL, response = NULL, predictor = NULL,
  include_na = TRUE)

# S3 method for rbin_factor
plot(x, ...)

Arguments

data

A data.frame or tibble.

response

Response variable.

predictor

Predictor variable.

include_na

logical; if TRUE, a separate bin is created for missing values.

x

An object of class rbin_factor.

...

further arguments passed to or from other methods.

Examples

bins <- rbin_factor(mbank, y, education) bins
#> Binning Summary #> --------------------------- #> Method Custom #> Response y #> Predictor education #> Levels 4 #> Count 4521 #> Goods 517 #> Bads 4004 #> Entropy 0.51 #> Information Value 0.05 #> #> #> # A tibble: 4 x 7 #> level bin_count good bad woe iv entropy #> <fct> <int> <int> <int> <dbl> <dbl> <dbl> #> 1 tertiary 1299 195 1104 -0.313 0.0318 0.610 #> 2 secondary 2352 231 2121 0.170 0.0141 0.463 #> 3 unknown 179 25 154 -0.229 0.00227 0.583 #> 4 primary 691 66 625 0.201 0.00572 0.455
# plot plot(bins)