plot_roc: Plot a receiver-operator characteristic curve.

View source: R/utils_plotting.R

plot_rocR Documentation

Plot a receiver-operator characteristic curve.

Description

Generates a ROC plot with for the fitted and outcome values. Optionally, a custom annotation inside the plot may be added.

Usage

plot_roc(
  predx_object,
  line_color = "steelblue",
  line_size = 0.5,
  cutoffs_at = 0.5,
  point_size = 0.3,
  plot_title = NULL,
  plot_subtitle = NULL,
  plot_tag = NULL,
  annotation_txt = NULL,
  annotation_color = line_color,
  annotation_size = 2.75,
  annotation_x = 0.6,
  annotation_y = 0.3,
  annotation_hjust = 0,
  annotation_vjust = 1,
  cust_theme = NULL,
  ...
)

Arguments

predx_object

a predx object.

line_color

color of the ROC line.

line_size

size of the ROC line.

cutoffs_at

numeric, between 0 and 1, indicates the cut points to be presented in the ROC curve.

point_size

size of the cutoff point.

plot_title

plot title.

plot_subtitle

plot subtitle.

plot_tag

plot tag, contains the number of complete observations and vents if not specified by the user.

annotation_txt

annotation text.

annotation_color

annotation text color.

annotation_size

size of the annotation text and of the cutoff label.

annotation_x

annotation x position.

annotation_y

annotation y position.

annotation_hjust

horizontal justification of the annotation text.

annotation_vjust

horizontal justification of the annotation text.

cust_theme

customized plot theme provided by the user.

...

extra arguments passed to geom_roc.

Details

The plot is generated by geom_roc.

Value

returns a ggplot object.


PiotrTymoszuk/caretExtra documentation built on Oct. 15, 2023, 10:03 p.m.