Learn R Programming

easyVerification (version 0.1.8)

count2prob: Convert counts to probabilities

Description

Using plotting positions as described in Wilks (2011), counts of occurences per forecast category are converted to probabilities of occurence. For ensembles of size 1 (e.g. verifying observations), the count vector is returned unaltered (corresponding to occurence probabilities of 0 or 1).

Usage

count2prob(x, type = 3)

Arguments

x
input matrix of counts from convert2prob
type
selection of plotting positions (default to 3, see Types)

Value

  • Matrix of probabilities per category

Types

The types characterize the plotting positions as specified in Wilks (2011). The plotting positions are computed using the following relationship:

$$p(x_i) = \frac{i + 1 - a}{n + 1 - a}$$

where i is the number of ensemble members not exceeding x, and n is the number of ensemble members. The types are characterized as follows:

clc{ type description a 1 Weibull 0 2 Bernard and Bos-Levenbach 0.3 3 Tukey 1/3 4 Gumbel 1 5 Hazen 1/2 6 Cunnane 2/5 }

References

Wilks, D.S. (2011). Statistical methods in the atmospheric sciences (Third Edition). Academic press.

See Also

convert2prob for conversion of continuous forecasts to ensemble counts

Examples

Run this code
tm <- toymodel()

## convert to tercile forecasts (only display first forecast and obs)
count2prob(convert2prob(tm$fcst, prob=1:2/3))[1,]
count2prob(convert2prob(tm$obs, prob=1:2/3))[1,]

Run the code above in your browser using DataLab