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.
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.
Details
The ara under the curve is returned. The user has the option of getting the receiver operating curve as well.