Description Usage Arguments Details Value Author(s) See Also Examples
Compute exact area under the ROC for empirical data.
1 |
truth |
logical vector, or numeric vector of 0s and 1s, indicating whether each case is a true positive. |
stat |
numeric vector containing test statistics used to rank cases, from largest to smallest.
If |
A receiver operating curve (ROC) is a plot of sensitivity (true positive rate) versus error (false positive rate) for a statistical test or binary classifier. The area under the ROC is a well accepted measure of test performance. It is equivalent to the probability that a randomly chosen pair of cases is corrected ranked.
Here we consider a test statistic stat
, with larger values being more significant, and a vector truth
indicating whether the null hypothesis is in fact true.
Correct ranking here means that truth[i]
is greater than or equal to truth[j]
when stat[i]
is greater than stat[j]
.
The function computes the exact area under the empirical ROC curve defined by truth
when ordered by stat
.
Numeric vector giving area under the curve, 1 being perfect and 0 being the minimum, or NULL
if truth
has zero length.
Gordon Smyth
See 08.Tests for other functions for testing and processing p-values.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.