plot.roc_cutpointr {cutpointr}R Documentation

Plot ROC curve from a cutpointr or roc_cutpointr object

Description

Given a cutpointr object this function plots the ROC curve(s) per subgroup, if given. Also plots a ROC curve from the output of roc().

Usage

## S3 method for class 'roc_cutpointr'
plot(x, type = "line", ...)

Arguments

x

A cutpointr or roc_cutpointr object.

type

"line" for line plot (default) or "step" for step plot.

...

Additional arguments (unused).

See Also

Other cutpointr plotting functions: plot.cutpointr(), plot_cut_boot(), plot_cutpointr(), plot_metric_boot(), plot_metric(), plot_precision_recall(), plot_sensitivity_specificity(), plot_x()

Examples

opt_cut <- cutpointr(suicide, dsi, suicide)
plot_roc(opt_cut, display_cutpoint = FALSE)

opt_cut_2groups <- cutpointr(suicide, dsi, suicide, gender)
plot_roc(opt_cut_2groups, display_cutpoint = TRUE)

roc_curve <- roc(suicide, x = dsi, class = suicide, pos_class = "yes",
  neg_class = "no", direction = ">=")
plot(roc_curve)
auc(roc_curve)

[Package cutpointr version 1.1.1 Index]