Weight of evidence and information value. Currently avialable for categorical predictors only.

blr_woe_iv(data, predictor, response, digits = 4, ...)

# S3 method for blr_woe_iv
plot(x, title = NA, xaxis_title = "Levels",
  yaxis_title = "WoE", bar_color = "blue", line_color = "red", ...)

Arguments

data

A tibble or data.frame.

predictor

Predictor variable; column in data.

response

Response variable; column in data.

digits

Number of decimal digits to round off.

...

Other inputs.

x

An object of class blr_segment_dist.

title

Plot title.

xaxis_title

X axis title.

yaxis_title

Y axis title.

bar_color

Color of the bar.

line_color

Color of the horizontal line.

Value

A tibble.

References

Siddiqi N (2006): Credit Risk Scorecards: developing and implementing intelligent credit scoring. New Jersey, Wiley.

See also

Examples

# woe and iv k <- blr_woe_iv(hsb2, female, honcomp) k
#> Weight of Evidence #> ------------------------------------------------------------------------- #> levels 0s_count 1s_count 0s_dist 1s_dist woe iv #> ------------------------------------------------------------------------- #> 0 73 18 0.50 0.34 0.38 0.06 #> 1 74 35 0.50 0.66 -0.27 0.04 #> ------------------------------------------------------------------------- #> #> Information Value #> ----------------------------- #> Variable Information Value #> ----------------------------- #> female 0.1023 #> -----------------------------
# plot woe plot(k)