Learn R Programming

ensembleBMA (version 2.1)

cdfBMA: Cummulative Distribution Function for ensemble BMA models

Description

Computes the cumulative distribution function (CDF) of an ensemble BMA mixture model at observation locations.

Usage

cdfBMA( fit, ensembleData, values, dates = NULL, popData = NULL, ...)

Arguments

fit
An ensemble BMA model fit.
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,
values
The vector of desired values at which the CDF of the BMA mixture model is to be evaluated.
dates
The dates for which the CDF will be computed. These dates must be consistent with fit and ensembleData. The default is to use all of the dates in fit.
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
...
Included for generic function compatibility.

Value

  • A vector of probabilities corresponding to the CDF at the desired values. Useful for determining propability of freezing, precipitation, etc.

Details

This method is generic, and can be applied to any ensemble BMA forecasting model. 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.

References

A. E. Raftery, T. Gneiting, F. Balabdaoui and M. Polakowski, Using Bayesian model averaging to calibrate forecast ensembles, Monthly Weather Review 133:1155--1174, 2005.

J. M. Sloughter, A. E. Raftery, T. Gneiting and C. Fraley, Probabilistic quantitative precipitation forecasting using Bayesian model averaging, Monthly Weather Review 135:3209--3220, 2007.

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

See Also

ensembleBMA, fitBMA, quantileForecastBMA

Examples

Run this code
data(slpTest)

  memberLabels <- c("AVN","GEM","ETA","NGM","NOGAPS")

  slpTestData <- ensembleData(forecasts = slpTest[ ,memberLabels],
                         observations = slpTest$obs, dates = slpTest$date)

  slpTestFit <- ensembleBMAnormal(slpTestData)

  slpTestForc <- quantileForecastBMA( slpTestFit, slpTestData)
  range(slpTestForc)

  slpTestCDF <- cdfBMA( slpTestFit, slpTestData, 
                        values = seq(from=1005, to=1025, by = 5))

Run the code above in your browser using DataLab