AUC_calc_integral {tdROC} | R Documentation |
Calculate the area under a ROC curve (AUC) by trapezoidal integration
Description
This function reads in a vector of sensitivity and a vector of specificity to calculates the area under the curve (AUC) by trapezoidal integration.
Usage
AUC_calc_integral(sens, spec)
Arguments
sens |
a numerical vector of sensitivity values within the range of (0, 1). |
spec |
a numerical vector of specificity values within the range of (0, 1). |
Value
It returns AUC as a numerical scalar.
Note
This function sorts sens
and 1-spec
in an increasing order.
A 0 and 1 will be added to the two ends of the sorted vectors. The Area Under the Curve (AUC) is obtained by trapezoidal
integration of the area under the piecewise linear curve obtained by connecting
points in sens
and 1-spec
.
[Package tdROC version 2.0 Index]