Learn R Programming

verification (version 1.37)

quantileScore: Quantile Score

Description

Calculates verification statistics for quantile forecasts.

Usage

quantileScore(obs, pred, p, breaks, ...)

Arguments

obs
Vector of observations
pred
Vector of quantile forecasts
p
Probability level of quantile forecasts [0,1].
breaks
Values used to bin the forecasts
...
Optional arguments

Value

  • qs.origQuantile score for original data
  • qsQuantile score for binned data
  • qs.baselineQuantile score for climatology
  • ssQuantile skill score
  • qs.reliabilityReliability part of the quantile score
  • qs.resolutionResolution part of the quantile score
  • qs.uncertUncertainty part of the quantile score
  • y.iDiscretized forecast values -- defined as the mean value of forecasts in each bin
  • obar.iConditional observed quantiles
  • prob.yNumber of forecast-observation pairs in each bin
  • obarClimatology -- unconditional sample quantile of observations
  • breaksValues used to bin the forecasts
  • checkDifference between original quantile score and quantile score decomposition

Details

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).

References

Bentzien, S. and Friederichs, P. (2013) Decomposition and graphical portrayal of the quantile score. Submitted to QJRMS.

See Also

check.func, qrel.plot

Examples

Run this code
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)
qrel.plot(qs)

Run the code above in your browser using DataLab