auc: ROC and AUC

View source: R/auc.R

ROC and AUCR Documentation

ROC and AUC

Description

Receiver operating curve and area under the curve.

Usage

auc(group, preds, roc = FALSE, cutoffs = NULL) 

Arguments

group

A numerical vector with the predicted values of each group as 0 and 1.

preds

The predicted values of each group.

roc

If you want the ROC to appear set it to TRUE.

cutoffs

If you provide a vector with decreasing numbers from 1 to 0 that will be used for the ROC, otherwise, the values from 1 to 0 with a step equal to -0.01 will be used.

Details

The ara under the curve is returned. The user has the option of getting the receiver operating curve as well.

Value

A list including:

cutoffs

The cutoff values.

sensitivity

The sensitivity values for each cutoff value.

specificity

The specificity value for each cutoff value.

youden

The pair of of 1- specificity and sensitivity where the Youden's J appears on the graph and the Youden index which is defined as the maximum value of sensitivity - specificity + 1.

auc

The area under the curve, plus a circle with the point where Youden's J is located. If "roc" is set to FALSE, this is the only item in the list to be returned.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr

See Also

bbc, testIndLogistic

Examples

g <- rbinom(150, 1, 0.6)
f <- rnorm(150)
auc(g, f, roc = FALSE)

MXM documentation built on Aug. 25, 2022, 9:05 a.m.