Learn R Programming

ensembleBMA (version 2.0)

ensembleBMAgamma0: BMA mixture of gammas ensemble forecasting models with a point mass at 0.

Description

Fits a Bayesian Model Averaging mixture of gammas with a point mass at 0 to ensemble forecasting data. Intended for modeling precipitation.

Usage

ensembleBMAgamma0( ensembleData, dates = NULL, 
                   trainingRule = list(length = 30, lag = 2), 
                   control = controlBMAgamma0(), warmStart = FALSE, popData = NULL)

Arguments

ensembleData
An ensembleData object including ensemble forecasts, observations and dates of precipitation.
dates
The dates for which modeling is 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 default is to use a 30 time step training period for a forecast 2 time steps ahead of the last time step in the training period.
control
A list of control values for the fitting functions. The defaults are given by the function controlBMAgamma0.
warmStart
A logical variable indicating whether or not estimation of models for a sequence of dates or time steps should be initialized with the weights from the previous date or time step. The default is for the initilaizatiin to be independent of
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

  • 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.
  • prob0coefsThe fitted coefficients in the model for the point mass at 0 for each member of the ensemble at each date.
  • biasCoefsThe fitted coefficients in the model for the mean of nonzero observations for each member of the ensemble at each date (bias correction).
  • varCoefsThe fitted coefficients for the model for the variance of nonzero observations at each date. The coefficients are the same for all members of the ensemble.
  • weightsThe fitted weights for the mixture of gammas model for the nonzero observations at each date.
  • transformationThe function corresponding the transformation of the data used to fit the models for the point mass at 0 and mean of nonzero observations. The untransformed forecast is used to fit the variance model. This is input as part of control.
  • inverseTransformationThe function corresponding to the inverse of transformation. Used in various diagnostic methods for the output.

Details

The output is for all of the dates in ensembleBMA, 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 ensembleBMAgamma0 objects: gridForecastBMA, quantileForecastBMA, bmaModelParameters, brierSkillScores, and crpsANDmae.

References

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, forecastBMAgamma0, controlBMAgamma0, fitBMAgamma0, gridForecastBMA, quantileForecastBMA, bmaModelParameters, brierSkillScores, crpsANDmae,

Examples

Run this code
data(prcp)

  prcpData <- ensembleData( dates = prcp$date, observations = prcp$obs,
                          forecasts = prcp[,c("CENT","AVN","CMCG","ETA",
                                      "GASP","JMA","NGPS","TCWB","UKMO")])

  prcpFit <- ensembleBMAgamma0(prcpData)

Run the code above in your browser using DataLab