blr_lorenz_curve: Lorenz curve

Description Usage Arguments See Also Examples

View source: R/blr-lorenz-curve.R

Description

Lorenz curve is a visual representation of inequality. It is used to measure the discriminatory power of the predictive model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
blr_lorenz_curve(
  model,
  data = NULL,
  title = "Lorenz Curve",
  xaxis_title = "Cumulative Events %",
  yaxis_title = "Cumulative Non Events %",
  diag_line_col = "red",
  lorenz_curve_col = "blue",
  print_plot = TRUE
)

Arguments

model

An object of class glm.

data

A tibble or data.frame.

title

Plot title.

xaxis_title

X axis title.

yaxis_title

Y axis title.

diag_line_col

Diagonal line color.

lorenz_curve_col

Color of the lorenz curve.

print_plot

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

See Also

Other model validation techniques: blr_confusion_matrix(), blr_decile_capture_rate(), blr_decile_lift_chart(), blr_gains_table(), blr_gini_index(), blr_ks_chart(), blr_roc_curve(), blr_test_hosmer_lemeshow()

Examples

1
2
3
4
model <- glm(honcomp ~ female + read + science, data = hsb2,
family = binomial(link = 'logit'))

blr_lorenz_curve(model)

blorr documentation built on July 2, 2020, 2:15 a.m.