| cal_plot | R Documentation | 
This code builds off of code written by Darren Dahly, PhD in this blog post: https://darrendahly.github.io/post/homr/.
cal_plot(
  df,
  outcome,
  prediction,
  n_bins = 10,
  show_loess = FALSE,
  plot_title = "",
  ...
)
| df | The df as a data.frame. | 
| outcome | A character string containing the name of the column containing the outcomes (expressed as 0/1s). | 
| prediction | A character string containing the name of the column containing the predictions. | 
| n_bins | Number of bins. Defaults to 10. Set to 0 to hide binned calibration. | 
| show_loess | Whether to show loess smoothed calibration estimates.
Defaults to FALSE. For  | 
| plot_title | A character string containing the title for the resulting plot. | 
A ggplot containing the calibration plot
data(single_model_dataset)
cal_plot(single_model_dataset, outcome = 'outcomes', prediction = 'predictions', n_bins = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.