plot_logodds: Plot a log-odds table

Description Usage Arguments Examples

Description

This function creates a nicely formatted, standardised log-odds plot. Prior to calling the function the data should only be in a form of a log-odds table (calculate_logodds_table() function will do that for you), unless it's already provided.

Usage

1
2
plot_logodds(df, title = "Evaluation of log-odds linearity",
  lab_x = "Mean of variable deciles", lab_y = "Log-odds")

Arguments

df

A data frame

title

Text that is displayed on as the plot title. Defaults to "Lift chart: evaluation of model predicted probabilities vs. actual defaul rates across deciles"

lab_x

Text that is displayed on the x axis. Defaults to "Mean of variable deciles"

lab_y

Text that is displayed on the y axis. Defaults to "Log-odds"

Examples

1
2
3
4
5
6
recipes::credit_data %>%
  first_to_lower() %>%
  calculate_logodds_table(binning = time,
                          grouping = status,
                          top_level = "bad") %>%
  plot_logodds()

konradsemsch/aider documentation built on May 22, 2019, 2:40 p.m.