Data for generating Lorenz curve.
Arguments
- model
An object of class
glm. Only binary logistic regression models (binomial family with logit link) are supported. Weighted models (any prior weight other than 1) and grouped binomial models (cbind(successes, failures)or proportions) are not supported; the model must be fitted withmodel = TRUE, y = TRUE.- data
A
tibbleordata.frame.- test_data
Logical;
TRUEif data is test data andFALSEif training data.
Examples
model <- glm(honcomp ~ female + read + science, data = hsb2,
family = binomial(link = 'logit'))
blr_prep_lorenz_data(model)
#> cum_0s_per cum_1s_per
#> 1 0.00000000 0.0000000
#> 2 0.04081633 0.2641509
#> 3 0.08843537 0.5094340
#> 4 0.15646259 0.6981132
#> 5 0.24489796 0.8301887
#> 6 0.36054422 0.8867925
#> 7 0.47619048 0.9433962
#> 8 0.60544218 0.9622642
#> 9 0.72789116 1.0000000
#> 10 0.86394558 1.0000000
#> 11 1.00000000 1.0000000
#> 12 1.00000000 1.0000000