caret (version 5.07-001)

roc: Compute the points for an ROC curve

Description

Computes sensitivity and specificity for a variety of cutoffs

Usage

roc(data, class, dataGrid = TRUE, gridLength = 100, positive = levels(class)[1])

Arguments

Value

  • A matrix of results with columns "cutoff", "sensitivity" and "specificity"

See Also

sensitivity, specificity, aucRoc

Examples

set.seed(6)
testData <- data.frame(x = c(rnorm(200), rnorm(200) + 1),
                       group = factor(rep(letters[1:2], each = 200)))
   
densityplot(~testData$x, groups = testData$group, auto.key = TRUE)   
   
roc(testData$x, testData$group)