plot.fbroc.roc {fbroc} | R Documentation |
Plots a fbroc.roc
object
Description
Plot a fbroc.roc
object and shows the ROC curve. The confidence
region for the ROC curve and the result for a specified performance metric
can also be included in the plot.
Usage
## S3 method for class 'fbroc.roc'
plot(x, col = "blue", fill = "royalblue1",
print.plot = TRUE, show.conf = TRUE, steps = 250,
conf.level = 0.95, show.metric = NULL, text.size.perf = 6,
show.area = !show.conf, ...)
Arguments
x |
Object of class |
col |
Color used for the curve. Defaults to blue. |
fill |
Color used for areas (confidence regions, AUCs and partial AUCs). |
print.plot |
Logical specifying whether the plot should be printed. |
show.conf |
Logical specifying whether the confidence region should be plotted. |
steps |
Number of discrete steps for the FPR at which the TPR is
calculated. TPR confidence intervals are given for all FPRs in
|
conf.level |
Confidence level of the confidence region. |
show.metric |
Character specifying which metric to display. See
|
text.size.perf |
Size of the text display when show.metric is set to |
show.area |
Whether to shade the AUC or partial AUC area. Defaults to !show.conf. |
... |
further arguments passed to |
Value
A ggplot, so that the user can customize the plot further.
See Also
Examples
y <- rep(c(TRUE, FALSE), each = 100)
x <- rnorm(200) + y
result.boot <- boot.roc(x, y, n.boot = 100)
plot(result.boot)
plot(result.boot, show.metric = "auc")
plot(result.boot, show.metric = "auc", show.conf = FALSE) # show area instead
plot(result.boot, show.metric = "tpr", fpr = 0.2)
plot(result.boot, show.metric = "partial.auc", fpr = c(0, 0.5),
show.partial.auc.warning = FALSE)
plot(result.boot, show.metric = "partial.auc", fpr = c(0, 0.5), show.conf = FALSE,
show.partial.auc.warning = FALSE) # show area instead