
Last chance! 50% off unlimited learning
Sale ends in
Calculates verification statistics for quantile forecasts.
quantileScore(obs, pred, p, breaks, ...)
Quantile score for original data
Quantile score for binned data
Quantile score for climatology
Quantile skill score
Reliability part of the quantile score
Resolution part of the quantile score
Uncertainty part of the quantile score
Discretized forecast values -- defined as the mean value of forecasts in each bin
Conditional observed quantiles
Number of forecast-observation pairs in each bin
Climatology -- unconditional sample quantile of observations
Values used to bin the forecasts
Difference between original quantile score and quantile score decomposition
Vector of observations
Vector of quantile forecasts
Probability level of quantile forecasts [0,1].
Values used to bin the forecasts
Optional arguments
Sabrina Bentzien
This function calculates the quantile score and its decomposition into reliability, resolution, and uncertainty. Note that a careful binning (discretization of forecast values) is necessary to obtain good estimates of reliability and resolution (see Bentzien and Friederichs (2013) for more details).
Bentzien, S. and Friederichs, P. (2013) Decomposition and graphical portrayal of the quantile score. Submitted to QJRMS.
check.func
, qrel.plot
data(precip.ensemble)
#Observations are in column 3
obs <- precip.ensemble[,3]
#Forecast values of ensemble are in columns 4 to 54
eps <- precip.ensemble[,4:54]
#Quantile forecasts from ensemble
p <- 0.9
qf <- apply(eps,1,quantile,prob=p,type=8)
#generate equally populated binnng intervals
breaks <- quantile(qf,seq(0,1,length.out=11))
qs <- quantileScore(obs,qf,p,breaks)
if (FALSE) qrel.plot(qs)
Run the code above in your browser using DataLab