roc_plot: Generate an ROC curve plot with error bars showing 95 percent...

View source: R/roc_plots.R

roc_plotR Documentation

Generate an ROC curve plot with error bars showing 95 percent confidence intervals

Description

This code builds off of code written by Vincent Guillemot found here: https://rpubs.com/vguillem/465086.

Usage

roc_plot(df, outcome, prediction, ci = FALSE, plot_title = "")

Arguments

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.

ci

Show confidence interval ribbon. Defaults to FALSE.

plot_title

A character string containing the title for the resulting plot.

Value

A ggplot containing the calibration plot

Examples

data(single_model_dataset)
roc_plot(single_model_dataset, outcome = 'outcomes', prediction = 'predictions', ci = TRUE)

ML4LHS/runway documentation built on Sept. 9, 2023, 8:27 p.m.