Learn R Programming

ensembleBMA (version 3.0-5)

fitBMAgamma0: BMA precipitation model fit to a training set

Description

Fits a Bayesian Modeling Averaging mixture of gammas with a point mass at 0 to a given training set. Intended for precipitation forecasts.

Usage

fitBMAgamma0( ensembleData, control = controlBMAgamma0(), 
              exchangeable = NULL)

Arguments

ensembleData
An ensembleData object including ensemble forecasts and verification observations. Missing values (indicated by NA) are allowed. Dates are ignored if they are included. This is the training set for the model.
control
A list of control values for the fitting functions. The defaults are given by the function controlBMAgamma0.
exchangeable
An optional numeric or character vector or factor indicating groups of ensemble members that are exchangeable (indistinguishable). The model fit will have equal weights and parameters within each group. If supplied, this argument will overr

Value

  • A list with the following output components:
  • prob0coefsThe fitted coefficients in the model for the point mass at 0 (probability of zero precipitation) for each member of the ensemble.
  • biasCoefsThe fitted coefficients in the model for the mean of nonzero observations for each member of the ensemble (used for bias correction).
  • varCoefsThe fitted coefficients for the model for the variance of nonzero observations (these are the same for all members of the ensemble).
  • weightsThe fitted BMA weights for the gamma components for each ensemble member.
  • nIterThe number of EM iterations.
  • transformationThe function corresponding to 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 for quantile forecasts and verification. This is input as part of control.

Details

This function fits a BMA model to a training data set. It is called by ensembleBMAgamma0, which can produce a sequence of fits over a larger precipitation data set. Methods available for the output of fitBMA include: cdf, quantileForecast, and modelParameters.

References

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 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, controlBMAgamma0, ensembleBMAgamma0, cdf, quantileForecast, modelParameters

Examples

Run this code
data(prcpTest)

  labels <- c("CENT","AVN","CMCG","ETA","GASP","JMA","NGPS","TCWB","UKMO")

  prcpTestData <- ensembleData( forecasts = prcpTest[ ,labels],
                         dates = prcpTest$date, observations = prcpTest$obs)

  DATE <- sort(unique(prcpTestData$dates))[27]
  trainDat <- trainingData(prcpTestData, date = DATE,
                           trainingRule = list(length=25,lag=2))

prcpFit <- fitBMA(trainDat, model = "gamma0")

  prcpFit <- fitBMAgamma0(trainDat)

Run the code above in your browser using DataLab