50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

ensembleBMA (version 3.0-5)

ensembleBMAnormal: BMA mixture of normals modeling

Description

Fits a Bayesian Model Averaging mixture of normals to ensemble forecasts. Allows specification of a training rule and forecasting dates.

Usage

ensembleBMAnormal(ensembleData, dates = NULL,
                  trainingRule = list(length=NA, lag=NA), 
                  control = controlBMAnormal(), exchangeable = NULL,
                  minCRPS = FALSE)

Arguments

ensembleData
An ensembleData object including ensemble forecasts, verification observations and dates. Missing values (indicated by NA) are allowed.
dates
The dates for which BMA forecasting models are desired. By default, this will include all dates consistent with the training rule.
trainingRule
A list giving the length and lag for the training period. The length gives the number of time steps (e.g. days) in the training period, and the lag gives the number of time steps ahead of the most recent date in the t
control
A list of control values for the fitting functions. The defaults are given by the function controlBMAnormal.
exchangeable
A numeric or character vector or factor indicating groups of ensemble members that are exchangeable (indistinguishable). The modeling will have equal weights and parameters within each group. The default determines exchangeability from
minCRPS
A logical variable indicating whether or not to add a postprocessing step after the BMA fit to choose the standard deviation so as to minimize the CRPS for the training data. The default is not to do the CRPS minimization, because it can ad

Value

  • A list with the following output components:
  • dateTableThe table of observations corresponding to the dates in ensembleData in chronological order.
  • trainingRuleThe training rule specified as input.
  • biasCoefsThe fitted bias-correction coefficients for each ensemble member at each date.
  • sdThe fitted standard deviations for the mixture of normals model at each date.
  • weightsThe fitted BMA weights for the normal components for each ensemble member at each date.

Details

The output is for all of the dates in ensembleData, so there will be missing entries denoted by NA for dates that are too recent to be forecast with the training rule. The following methods are available for ensembleBMAnormal objects: cdf, quantileForecast, modelParameters, brierScore, crps and mae.

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.

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

ensembleData, controlBMAnormal, trainingControl, fitBMAnormal, cdf, quantileForecast, modelParameters, brierScore, crps, mae

Examples

Run this code
data(slpTest)

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

\dontrun{
  slpTestFit <- ensembleBMA( slpTestData, model = "normal",
                             trainingRule = list(length=30,lag=2))
}

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

Run the code above in your browser using DataLab