Data for generating lift chart.

blr_prep_lchart_gmean(gains_table)

blr_prep_lchart_data(gains_table, global_mean)

Arguments

gains_table

An object of clas blr_gains_table.

global_mean

Overall conversion rate.

Examples

model <- glm(honcomp ~ female + read + science, data = hsb2, family = binomial(link = 'logit')) gt <- blr_gains_table(model) globalmean <- blr_prep_lchart_gmean(gt) blr_prep_lchart_data(gt, globalmean)
#> # A tibble: 10 x 5 #> decile total `1` decile_mean d_by_g_mean #> <dbl> <int> <int> <dbl> <dbl> #> 1 1 20 14 0.7 2.64 #> 2 2 20 13 0.65 2.45 #> 3 3 20 10 0.5 1.89 #> 4 4 20 7 0.35 1.32 #> 5 5 20 3 0.15 0.566 #> 6 6 20 3 0.15 0.566 #> 7 7 20 1 0.05 0.189 #> 8 8 20 2 0.1 0.377 #> 9 9 20 0 0 0 #> 10 10 20 0 0 0