roc_2panel: roc_2panel Draws a ROC curve (with legend) with a second...

View source: R/SPARRAfairness_functions.R

roc_2panelR Documentation

roc_2panel Draws a ROC curve (with legend) with a second panel underneath showing sensitivity difference.

Description

roc_2panel Draws a ROC curve (with legend) with a second panel underneath showing sensitivity difference.

Usage

roc_2panel(
  rocs,
  labels = names(rocs),
  col = 1:length(rocs),
  xy_col = phs_colours("phs-magenta"),
  highlight = NULL,
  yrange_lower = NULL,
  legend_title = ""
)

Arguments

rocs

list of sparraROC objects

labels

labels to use in legend; default to names of rocs.

col

line colours

xy_col

line colour for x-y line, defaults to red

highlight

if non-null, add a point at this cutoff

yrange_lower

y range for lower plot. If NULL, generates automatically

legend_title

title for legend, defaults to nothing

Value

Invisibly returns plot as ggplot object

Examples

# See vignette

SPARRAfairness documentation built on April 11, 2025, 6:17 p.m.