auROC {limma} | R Documentation |
Compute exact area under the ROC for empirical data.
auROC(truth, stat=NULL)
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 |
This function computes the exact area under an empirical ROC curve.
Cases are ranked by stat
from largest to smallest.
The number of true and false discoveries are determined by how well the true states represented by truth
match up with the observed statistics given 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.
See also AUC
in the ROC
package.
auROC(c(1,1,0,0,0)) truth <- rbinom(30,size=1,prob=0.2) stat <- rchisq(30,df=2) auROC(truth,stat)