rnk: Ranks

View source: R/rnk.R

rnkR Documentation

Ranks

Description

This function calculates the ranks given observations of an univariate variable and samples of a predictive distribution.

Usage

rnk(y, x, na.rm = FALSE)

Arguments

y

vector of observations

x

matrix of samples of a predictive distribution (depending on y; see details)

na.rm

logical; if TRUE NA are stripped before the rank computation proceeds; if FALSE NA are used in the rank computation; default: FALSE

Details

For a vector y of length n, x should be given as matrix with n rows, where the i-th entry of y belongs to the i-th row of x. The columns of x represent the samples of a predictive distribution.

Value

Vector of ranks.

Author(s)

David Jobst

References

Anderson, J. (1996). A method for producing and evaluating probabilistic forecasts from ensemble model integrations. Journal of Climate, 9, 1518-1530.

Candille, G. and Talagrand, O. (2005). Evaluation of probabilistic prediction systems for a scalar variable. Quarterly Journal of the Royal Meteorological Society, 131(609), 2131-2150.

Hamill, T. and Colucci, S. (1997). Verification of Eta-RSM short-range ensemble forecasts. Monthly Weather Review, 125, 1312-1327.

Hamill, T. (2001). Interpretation of rank histograms for verifying ensemble forecasts. Monthly Weather Review, 129, 550-560.

Talagrand, O., Vautard, R. and Strauss, B. (1997). Evaluation of probabilistic prediction systems. Workshop on Predictability (ECMWF), 1-25.

Examples

# simulated data
n <- 30
m <- 50
y <- rnorm(n)
x <- matrix(rnorm(n*m), ncol = m)

# rank calculation
rnk(y = y, x = x)


jobstdavid/eppverification documentation built on May 13, 2024, 5:20 p.m.