ri | R Documentation |
This function calculates the Reliability Index (RI) given observations of an univariate variable and samples of a predictive distribution.
ri(y, x, bins = NULL, na.rm = FALSE)
y |
vector of observations |
x |
matrix of samples of a predictive distribution (depending on |
bins |
numeric; if |
na.rm |
logical; if |
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.
The parameter bins
specifies the number of columns for the VRH. For "large"
ncol(x)
it is often reasonable to reduce the resolution of the VRH by
using bins
so that (ncol(x)+1)/bins
is an integer.
The deviation from uniformity of the VRH can be quantified by the reliability index (RI). The smaller the RI, the better the calibration of the forecast. The optimal value of the RI is 0.
Vector of the score value.
David Jobst
Delle Monache, L., Hacker, J., Zhou, Y., Deng, X. and Stull, R., (2006). Probabilistic aspects of meteorological and ozone regional ensemble forecasts. Journal of Geophysical Research: Atmospheres, 111, D24307.
# simulated data
n <- 30
m <- 50
y <- rnorm(n)
x <- matrix(rnorm(n*m), ncol = m)
# ri calculation
ri(y = y, x = x)
ri(y = y, x = x, bins = 17)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.