crps {ensembleBMA}R Documentation

Continuous Ranked Probability Score

Description

Computes the continuous ranked probability score (CRPS) for ensemble forecasting models.

Usage

crps( fit, ensembleData, nSamples=NULL, seed=NULL, dates=NULL, ...)

Arguments

fit A model fit to ensemble forecasting data.
ensembleData An ensembleData object that includes ensemble forecasts, verification observations and dates. Missing values (indicated by NA) are allowed. \ This need not be the data used for the model fit, although it must include the same ensemble members. \ If ensembleData includes dates, they must be consistent with fit and dates. If ensembleData does not include dates, they will be inferred from fit and dates.
nSamples The number of simulation samples for CRPS via simulation. For the normal model, the default is analytic computation of the CRPS. For the gamma model with a point mass at 0 (precipitation), the CRPS is always computed by simulation, with default nSamples = 10000.
seed Argument to set.seed for random number generation in simulation.
dates The dates for which the CRPS will be computed. These dates must be consistent with fit and ensembleData. The default is to use all of the dates in fit. The dates are ignored if fit originates from fitBMA, which also ignores date information.
... Included for generic function compatibility.

Details

This method is generic, and can be applied to all ensemble forecasting models.
Note the model may have been applied to a transformation of the data, but that information is included in the input fit, and the output is transformed appropriately.
For the gamma0 model for precipitation, the CRPS is only available through simulation, because a transformation of the forecast values is being modeled rather than the forecast values themselves (the default transformation is the cube root). The default number of simulation samples in this case is 10,000.
For normal models for temperature and pressure, analytic computation of the CRPS is the default. CRPS will be computed via simulation for normal models only if nSamples is set to a positive value.

Value

A vector giving the CRPS for the raw ensemble and the probabilistic forecast.

References

E. P. Grimit, T. Gneiting, V. J. Berrocal and N. A. Johnson, The continuous ranked probability score for circular variables and its application to mesoscale forecast ensemble verification, Quarterly Journal of the Royal Meteorological Society 132:2925-2642 (2006).

C. Fraley, A. E. Raftery, T. Gneiting and J. M. Sloughter, ensembleBMA: An R Package for Probabilistic Forecasting using Ensembles and Bayesian Model Averaging, Technical Report No. 516R, Department of Statistics, University of Washington, May 2008.

C. Fraley, A. E. Raftery, T. Gneiting, BMA Forecasting with Missing and Exchangeable Ensemble Members, in preparation.

See Also

ensembleBMA

Examples

  data(slpTest)
  
  memberLabels <- c("AVN","GEM","ETA","NGM","NOGAPS")
  slpTestData <- ensembleData(forecasts = slpTest[ ,memberLabels],
                         observations = slpTest$obs, dates = slpTest$date)

  slpTestFit <- ensembleBMAnormal(slpTestData,
                  trainingRule = list(length=30, lag=2))

  crps( slpTestFit, slpTestData)

[Package ensembleBMA version 3.0-2 Index]