EnsRoca {easyVerification} | R Documentation |
Area Under the ROC Curve
Description
Computes the area under the ROC curve given the observations.
EnsRoca
computes the Area Under the Curve (AUC). For ease of interpretation,
EnsRocss
converts the AUC to the range from -1 to 1 with zero indicating
a forecast with no discrimination.
Usage
EnsRoca(ens, obs, use.easy = FALSE)
EnsRocss(ens, obs, use.easy = FALSE)
Arguments
ens |
n x j matrix of n probability forecasts for j categories |
obs |
n x j matrix of occurence of n verifying observations in j categories |
use.easy |
logical, should implementation of standard errors as implemented
in |
Standard Error
If used with SpecsVerification >= 0.5
, the standard errors as implemented
in the function SpecsVerification::Auc
are used.
If use.easy = TRUE
or when used with an older version of SpecsVerification
,
the standard error \sigma
of the ROC area
skill score is given by the following formula after Broecker (2012).
\sigma^2 = \frac{1}{3} \left(\frac{1}{N_0} + \frac{1}{N_1} +
\frac{1}{N_0 N_1} \right)
Where \sigma
is the standard error, N_1
the number of
events, and N_0
the number of non-events in category i
.
References
Br\"ocker, J. (2012). Probability forecasts. Forecast Verification: A Practitioner's Guide in Atmospheric Science, Second Edition, 119-139.
See Also
Examples
tm <- toymodel()
## compute ROC area for tercile forecasts using veriApply
veriApply("EnsRoca", fcst = tm$fcst, obs = tm$obs, prob = 1:2 / 3)