Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

blr_ks_chart

KS chart


Description

Kolmogorov-Smirnov (KS) statistics is used to assess predictive power for marketing or credit risk models. It is the maximum difference between cumulative event and non-event distribution across score/probability bands. The gains table typically has across score bands and can be used to find the KS for a model.

Usage

blr_ks_chart(
  gains_table,
  title = "KS Chart",
  yaxis_title = " ",
  xaxis_title = "Cumulative Population %",
  ks_line_color = "black",
  print_plot = TRUE
)

Arguments

gains_table

An object of class blr_gains_table.

title

Plot title.

yaxis_title

Y axis title.

xaxis_title

X axis title.

ks_line_color

Color of the line indicating maximum KS statistic.

print_plot

logical; if TRUE, prints the plot else returns a plot object.

References

See Also

Examples

model <- glm(honcomp ~ female + read + science, data = hsb2,
             family = binomial(link = 'logit'))
gt <- blr_gains_table(model)
blr_ks_chart(gt)

blorr

Tools for Developing Binary Logistic Regression Models

v0.3.0
MIT + file LICENSE
Authors
Aravind Hebbali [aut, cre] (<https://orcid.org/0000-0001-9220-9669>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.