Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

value

Forecast Value Function


Description

Calculates the economic value of a forecast based on a cost/loss ratio.

Usage

value(obs, pred= NULL, baseline = NULL, cl = seq(0.05, 0.95, 0.05),
    plot = TRUE, all = FALSE, thresholds = seq(0.05, 0.95, 0.05),
    ylim = c(-0.05, 1), xlim = c(0,1), ...)

Arguments

obs

A vector of binary observations or a contingency table summary of values in the form c(n11, n01, n10, n00) where in nab a = obs, b = forecast.

pred

A vector of probabilistic predictions.

baseline

Baseline or naive forecast. Typically climatology.

cl

Cost loss ratio. The relative value of being unprepared and taking a loss to that of un-necessarily preparing. For example, cl = 0.1 indicates it would cost \$ 1 to prevent a \$10 loss. This defaults to the sequence 0.05 to 0.95 by 0.05.

plot

Should a plot be created? Default is TRUE

all

In the case of probabilistic forecasts, should value curves for each thresholds be displayed.

thresholds

Thresholds considered for a probabilistic forecast.

ylim, xlim

Plotting options.

...

Options to be passed into the plotting function.

Value

If assigned to an object, the following values are reported.

vmax

Maximum value

V

Vector of values for each cl value

F

Conditional false alarm rate.

H

Conditional hit rate

cl

Vector of cost loss ratios.

s

Base rate

Author(s)

Matt Pocernich

References

Jolliffe, Ian and David B. Stephensen (2003) Forecast Verification: A Practioner's Guide in Atmospheric Science, Chapter 8. Wiley

Examples

## value as a contingency table
## Finley tornado data
obs<- c(28, 72, 23, 2680) 
value(obs)
aa <- value(obs)
aa$Vmax # max value

## probabilistic forecast example
 obs  <- round(runif(100) )
 pred <-  runif(100)

value(obs, pred, main = "Sample Plot",
             thresholds = seq(0.02, 0.98, 0.02) ) 
##########
data(pop)
d <- pop.convert()

value(obs = d$obs_rain, pred = d$p24_rain, all = TRUE)

verification

Weather Forecast Verification Utilities

v1.42
GPL (>= 2)
Authors
NCAR - Research Applications Laboratory
Initial release
2015-07-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.