Learn R Programming

cutpointr (version 0.7.3)

plot_roc: Plot ROC curve from a cutpointr object

Description

Given a cutpointr object this function plots the ROC curve(s) per subgroup, if given.

Usage

plot_roc(x, display_cutpoint = TRUE, ...)

Arguments

x

A cutpointr object.

display_cutpoint

(logical) Whether or not to display the optimal cutpoint as a dot on the ROC curve.

...

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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab