ROC | R Documentation |
Plots A ROC Curve and computes AUC
ROC(formula, data, plot = TRUE, add = FALSE, ...)
formula |
an object of class formula. |
data |
an optional data frame containing the variables in the model. |
plot |
if |
add |
if |
... |
extra parameters for the plot function |
an invisible list with components x
(the specificity),
y
(the sensitivity), and AUC
(the AUC).
ROC(T21 ~ hCG, data = T21)
ROC(T21 ~ I(-AFP), T21, add = TRUE, lty = 2)
ROC(T21 ~ I(hCG/100 - 6.8*AFP + 51*age.gest + 33*age), data = T21, add = TRUE, col = "red")
abline(0,1,lty=3)
legend("bottomright", lty = c(1,2,1),
col = c("black", "black", "red"), legend = c("hCG", "-AFP", "all vars"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.