plot.roc {MDMA} | R Documentation |
plot roc curve
Description
Plot an ROC curve.
Usage
## S3 method for class 'roc'
plot(
x,
y,
which = 1:3,
orientation = c("horizontal", "vertical"),
cutoffs.1 = NULL,
cutoffs.2 = NULL,
cutoffs.3 = NULL,
xlab.3 = NULL,
labels.3 = NULL,
xlim.3 = NULL,
ylim.3 = c(0, 10),
pos.legend.2 = "right",
pos.legend.3 = "topright",
...
)
Arguments
x |
object of class |
y |
argument for generic |
which |
which plots to show (see Details). |
orientation |
indicate whether the plots should be arranged horizontally or vertically. |
cutoffs.1 |
cutoff value(s) to be shown in the first plot. |
cutoffs.2 |
cutoff value(s) to be shown in the second plot. |
cutoffs.3 |
cutoff value(s) to be shown in the third plot. |
xlab.3 |
lable for x axis in third plot. |
labels.3 |
legend labels for third plot. |
xlim.3 |
xlim for third plot. |
ylim.3 |
ylim for third plot. |
pos.legend.2 |
legend position for second plot. |
pos.legend.3 |
legend position for third plot. |
... |
other arguments for generic |
Value
plot.roc
provides three plots:
The first plot contains the ROC curve.
The second plot contains curves for the sensitivity and the specificity for all threshold values.
The third plot contains density plots for the two classification groups.
Author(s)
Mathijs Deen
Examples
a <- roc(QIDS$QIDS, QIDS$depression, c("Yes","No"), "Yes")
plot(a, ylim.3 = c(0,.2), xlab.3= "QIDS value", cutoffs.1 = 14.5,
cutoffs.2 = 14.5, cutoffs.3 = 14.5)