plot_roc | R Documentation |
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()
.
plot_roc(x, ...) ## S3 method for class 'cutpointr' plot_roc(x, display_cutpoint = TRUE, type = "line", ...) ## S3 method for class 'roc_cutpointr' plot_roc(x, type = "line", ...)
x |
A cutpointr or roc_cutpointr object. |
... |
Additional arguments (unused). |
display_cutpoint |
(logical) Whether or not to display the optimal cutpoint as a dot on the ROC curve for cutpointr objects. |
type |
"line" for line plot (default) or "step" for step plot. |
Other cutpointr plotting functions:
plot.cutpointr()
,
plot_cut_boot()
,
plot_cutpointr()
,
plot_metric_boot()
,
plot_metric()
,
plot_precision_recall()
,
plot_sensitivity_specificity()
,
plot_x()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.