Learn R Programming

verification (version 1.41)

crpsDecompostion: Decompostion of Continuous Ranked Probability Score

Description

The CRPS measures the distance between the predicted and the observed cumulative density functions (CDFs) of scalar variables. Furthermore, the crpsDecomposition function provides the reliability and resolution terms obtained by the CRPS decomposition proposed by Hersbach. The alpha, beta matrices and Heavisides vectors of outliers calculated in the CRPS decomposition are also returned. To speed up calculation time, these matrices/vectors can then be used to recalculate the CRPS's in a bootstrap by using the crpsFromAlphaBeta function.

Usage

crpsDecomposition(obs, eps)
      crpsFromAlphaBeta(alpha,beta,heaviside0,heavisideN)

Arguments

obs
Vector of observations
eps
Matrix of ensemble forecast. Each column represent a member.
alpha
Matrix of alpha (returned from crpsDecomposition)
beta
Vector of beta (returned from crpsDecomposition)
heaviside0
Vector of Heaviside for outlier i=0 (returned from crpsDecomposition)
heavisideN
Vector of Heaviside for outlier i=N (returned from crpsDecomposition)

Value

  • CRPSCRPS score
  • CRPSpotThe potential CRPS (Resolution - Uncertainty)
  • ReliThe Reliability term of the CRPS
  • alphaMatrix (Nobservation rows x Nmember +1 columns) of alpha used in the CRPS decomposition.
  • betaMatrix (Nobservation rows x Nmember +1 columns) of beta used in the CRPS decomposition.
  • heaviside0Vector (Nobservation length) of Heaviside for outlier i=0 used in the CRPS decomposition
  • heavisideNVector (Nobservation length) of Heaviside for outlier i=N used in the CRPS decomposition

References

G. Candille, P. L. Houtekamer, and G. Pellerin: Verification of an Ensemble Prediction System against Observations, Monthly Weather Review,135, pp. 2688-2699

Hershcach, Hans, 2000. Decomposition of the Continuous Ranked Probability Score for Ensemble Prediction Systems. Weather and Forecasting, 15, (5) pp. 559-570.

Examples

Run this code
data(precip.ensemble)
x <- precip.ensemble[seq(5,5170,5),]

#Observations are in the column
obs<-x[,3]

#Forecast values of ensemble are in the column 4 to 54
eps<-x[,4:54]

#CRPS calculation 
c<-crpsDecomposition(obs,eps)

#CRPS with alpha and beta
#Resampling indices
nObs<-length(obs)
i<-sample(seq(nObs),nObs,replace=TRUE)
crps2<-crpsFromAlphaBeta(c$alpha[i,],c$beta[i,],c$heaviside0[i],c$heavisideN[i])

Run the code above in your browser using DataLab