R: Calculate area under the ROC curve (AUC) for a forecast and...

Auc {SpecsVerification} | R Documentation

## Calculate area under the ROC curve (AUC) for a forecast and its verifying binary observation, and estimate the variance of the AUC

### Description

Calculate area under the ROC curve (AUC) for a forecast and its verifying binary observation, and estimate the variance of the AUC

### Usage

    Auc(
      fcst,
      obs,
      handle.na = c("na.fail", "only.complete.pairs"),
      use_fn = c("C++", "R")
    )

### Arguments

`fcst` | vector of forecasts
`obs` | vector of binary observations (0 for non-occurrence, 1 for occurrence of the event)
`handle.na` | how should missing values in forecasts and observations be handled; possible values are 'na.fail' and 'only.complete.pairs'; default: 'na.fail'
`use_fn` | the function used for the calculation: 'C++' (default) for the fast C++ implementation, or 'R' for the slow (but more readable) R implementation

### Value

vector containing AUC and its estimated sampling standard deviation

### References

DeLong et al (1988): Comparing the Areas under Two or More Correlated Receiver Operating Characteristic Curves: A Nonparametric Approach. Biometrics. https://www.jstor.org/stable/2531595 Sun and Xu (2014): Fast Implementation of DeLong's Algorithm for Comparing the Areas Under Correlated Receiver Operating Characteristic Curves. IEEE Sign Proc Let 21(11). doi: 10.1109/LSP.2014.2337313

### See Also

AucDiff

### Examples

    data(eurotempforecast)
    Auc(rowMeans(ens.bin), obs.bin)

[Package SpecsVerification version 0.5-3 Index]