crps {ensembleBMA}R Documentation

Continuous Ranked Probability Score

Description

Computes the continuous ranked probability score (CRPS) for ensemble BMA forecasts.

Usage

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

Arguments

fit An ensemble BMA model fit for ensembleData.
ensembleData An ensembleData object including ensemble forecasts and observations. It need not be the object used to form 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 the fit and the dates argument.
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.
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.
popData For gamma0 model fits, there is an additional popData argument for providing predictors in the logistic regression for probability of zero precipitation. If popData was supplied to obtain in the modeling for fit, then popData of the same kind must be supplied here.
... Included for generic function compatibility.

Details

This method is generic, and can be applied to all ensemble BMA 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 BMA 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. 516, Department of Statistics, University of Washington, August 2007.

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)

  crps( slpTestFit, slpTestData)

[Package ensembleBMA version 2.1 Index]