Description Usage Arguments Examples
This function calculates a log-odds table for any combination of numerical and categorical variables.
| 1 2 | 
| df | A data frame | 
| binning | Variable for which binning should be applied | 
| grouping | A two-level (binary) variable to calculate the ratio in each bin | 
| top_level | Top level of the grouping variable. Defaults to 1 | 
| n_bins | Provide a number of bins. Defaults to 10 | 
| risk_names | Should column names be converted to risk-specific names? Defaults to TRUE | 
| format | Should table printing be formatted with kable? Defaults to FALSE | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | recipes::credit_data %>%
  first_to_lower() %>%
  calculate_logodds_table(binning = time,
                          grouping = status,
                          top_level = "bad")
recipes::credit_data %>%
  first_to_lower() %>%
  select(marital, status, time) %>%
  nest(-marital) %>%
  mutate(stats = purrr::map(data, calculate_logodds_table, time, status, "bad")) %>%
  select(marital, stats) %>%
  unnest()
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.