auROC {limma} | R Documentation

## Area Under Receiver Operating Curve

### Description

Compute exact area under the ROC for empirical data.

### Usage

    auROC(truth, stat)

### Arguments

`truth` | numeric vector of 0 and 1 indicating whether the null or alternative respectively is true for each case. If `stat` is missing then `truth` is assuming to be already sorted in decreasing test statistic order.
`stat` | numeric vector containing test statistics. Hypotheses are to be rejected if `stat` exceeds a given threshold.

### Details

This function computes the exact area under an empirical ROC curve. 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`.

### Value

Numeric vector giving area under the curve, 1 being perfect and 0 being the minimum, or `NULL` if `truth` has zero length.

### Author(s)

Gordon Smyth

### See Also

See 08.Tests for other functions for testing and processing p-values.

See also `AUC` in the `ROC` package.

### Examples

    auROC(c(1,1,0,0,0))
    truth <- rbinom(30,size=1,prob=0.2)
    stat <- rchisq(30,df=2)
    auROC(truth,stat)

[Package limma version 2.2.0 Index]