Learn R Programming

ensembleBMA (version 2.0)

forecastBMA: Ensemble BMA forecast for a given date at observation locations.

Description

Gives an ensemble BMA forecast for a given date at observation locations. The model to be fitted depends on the type of data.

Usage

forecastBMA( date, ensembleData, trainingRule = list(length = 30, lag = 2), 
             control = NULL, quantiles = 0.5, model = NULL, 
             minCRPS = NULL, popData = NULL)

Arguments

date
An integer or character string givin the date for which the forecast is desired.
ensembleData
An ensembleData object including ensemble forecasts, observations and dates. Must include the date referenced in the date argument.
trainingRule
A list giving the length and lag for the training period. The default is to use a 30 day training period for a forecast 2 days ahead of the last day in the training period.
control
A list of control values for the fitting functions. The default is controlBMAnormal() for temperature or pressure data and controlBMAgamma0() for precipitation data.
quantiles
A vector of quantiles for which the forecast is desired. The default is 0.5, for the median forecast of the model.
model
A character string describing the BMA model to be fit. Current choices are "normal" for temperature or pressure data, and "gamma0" for precipitation data. Used only in function forecastBMA.
minCRPS
A logical variable indicating whether or not to add a postprocessing step after a normal BMA fit to choose the standard deviation so as to minimize the CRPS. The default is not to do the CRPS minimization for normal data (temperature and pr
popData
Optional predictors for the logistic regression for probability of precipitation. This option applies to the mixture of gammas model with a point mass at zero that is used for precipitation. In this model, the default predictors are an

Value

  • The matrix of quantile forecasts for the given date.

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, Technical Report No. 496R, Department of Statistics, University of Washington, October 2006 (to appear in Montly Weather Review).

See Also

ensembleData, controlBMAnormal, controlBMAgamma0, gridForecastBMA, quantileForecastBMA

Examples

Run this code
data(slp)

  slpData <- ensembleData(forecasts = slp[c("AVN","GEM","ETA","NGM","NOGAPS")],
                          observations = slp$obs, dates = slp$date)

  unique(slpData$dates)

  slpForc1 <- forecastBMA( "2000063000", slpData, model = "normal",
                               quantiles = c(0.5,0.9))

  slpForc2 <- forecastBMAnormal( "2000063000", slpData, 
                               quantiles = c(0.5,0.9))

Run the code above in your browser using DataLab