Learn R Programming

SpatialVx (version 0.1-2)

vxstats: Calculate some common traditional forecast verification statistics.

Description

Calculates some common traditional forecast verification statistics.

Usage

vxstats(Fcst, Obs, which.stats = c("bias", "ts", "ets", "pod", "far", "f", "hk", "bcts", "bcets", "mse"), subset = NULL)

Arguments

Fcst
k X m matrix of forecast values.
Obs
k X m matrix of observed values.
which.stats
character vector giving the names of the desired statistics. See Details below.
subset
numeric vector indicating a subset of the verification set over which to calculate the verification statistics.

Value

  • A list with components determined by which.stats, which may include any or all of the following.
  • biasnumeric giving the frequency bias.
  • tsnumeric giving the threat score.
  • etsnumeric giving the equitable threat score, also known as the Gilbert Skill Score.
  • podnumeric giving the probability of decking an event, also known as the hit rate.
  • farnumeric giving the false alarm ratio.
  • fnumeric giving the false alarm rate.
  • hknumeric giving the Hanssen and Kuipers statistic.
  • bcts, bcetsnumeric giving the bias corrected version of the threat- and/or equitable threat score.
  • msenumeric giving the mean square error.

Warning

It is up to the user to provide the appropriate type of fields for the given statistics to be computed. For example, they must be binary for all types of which.stats except mse.

Details

Computes several traditional verification statistics (see Wilks, 2006, Ch. 7; Jolliffe and Stephenson, 2012 for more on these forecast verification statistics; as well as the Issues, Methods and FAQ web page of the Joint Working Group on Forecast Verification of the World Meteorological Organization at: http://www.cawcr.gov.au/projects/verification/) The possible statistics that can be computed, as determined by 'which.stats' are:

"bias" the number of forecast events divided by the number of observed events (sometimes called frequency bias).

"ts" threat score, given by hits/(hits + misses + false alarms)

"ets" equitable threat score, given by (hits - hits.random)/(hits + misses + false alarms - hits.random), where 'hits.random' is the number of observed events times the number of forecast events divided by the total number of forecasts.

"pod" probability of detecting an observed event (aka, hit rate). It is given by hits/(hits + misses).

"far" false alarm ratio, given by (false alarms)/(hits + false alarms).

"f" false alarm rate (aka probability of false detection) is given by (false alarms)/(correct rejections + false alarms).

"hk" Hanssen-Kuipers Score is given by the difference between the hit rate ("pod") and the false alarm rate ("f").

"bcts", "bcets", Bias Corrected Threat Score (Equitable Threat Score) as introduced in Mesinger (2008); see also Brill and Mesinger (2009). Also referred to as the dHdA versions of these scores.

"mse" mean square error (not a contingency table statistic, but can be used with binary fields). This is the only statistic that can be calculated here that does not require binary fields for 'Fcst' and 'Obs'.

References

Brill, K. F. and F. Mesinger, 2009: Applying a general analytic method for assessing bias sensitivity to bias-adjusted threat and equitable threat scores. Wea. Forecasting, 24, 1748--1754.

Jolliffe, I. T. and D. B. Stephenson, Edts., 2012: Forecast Verification: A Practitioner's Guide in Atmospheric Science, 2nd edition. Wiley, Chichester, West Sussex, UK, 274 pp.

Mesinger, F., 2008: Bias adjusted precipitation threat scores. Adv. Geosci., 16, 137--142.

Wilks, D. S., 2006: Statistical Methods in the Atmospheric Sciences. 2nd Edition, Academic Press, Burlington, Massachusetts, 627pp.

See Also

hoods2d

Examples

Run this code
# Calculate the traditional verification scores for the first geometric case
# of the ICP.
data(geom001)
data(geom000)
rmse <- sqrt(vxstats( geom001, geom000, which.stats="mse")$mse)
rmse
vxstats( geom001 > 0, geom000 > 0, which.stats=c("bias", "ts", "ets", "pod", "far", "f", "hk"))

data(geom005)
vxstats( geom005 > 0, geom000 >0, which.stats=c("ts","ets","bcts","bcets"))

Run the code above in your browser using DataLab