fitBMA {ensembleBMA}R Documentation

BMA model fit to a training set

Description

Fits a Bayesian Modeling Averaging mixture model to a given training set.

Usage

fitBMA( ensembleData, control = NULL, model = NULL, 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 default is controlBMAnormal() for normal models and controlBMAgamma0() for gamma models with a point mass at 0.

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.

exchangeable

A 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. The default determines exchangeability from ensembleData.

Details

This function fits a BMA model to a training data set.
Methods available for fitBMA objects (the output of fitBMA) include: cdf, quantileForecast, and modelParameters.

Value

A list with the following output components:

...

One or more components corresponding to the coeffcients of the model.

weights

The fitted BMA weights for the mixture components for each ensemble member.

nIter

The number of EM iterations.

power

A scalar value giving the power (if any) by which the data was transformed for modeling. The untransformed forecast is used to fit the variance model. This is input as part of control, and applies only to certain models.

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 Ensembles and Bayesian Model Averaging, Technical Report No. 516R, Department of Statistics, University of Washington, 2007 (revised 2010).

C. Fraley, A. E. Raftery, T. Gneiting, Calibrating Multi-Model Forecast Ensembles with Exchangeable and Missing Members using Bayesian Model Averaging, Monthly Weather Review 138:190–202, 2010.

J. M. Sloughter, T. Gneiting and A. E. Raftery, Probabilistic wind speed forecasting using ensembles and Bayesian model averaging, Journal of the American Statistical Association, 105:25–35, 2010.

See Also

ensembleData, ensembleBMA, fitBMAgamma, fitBMAgamma0, fitBMAnormal, cdf, quantileForecast, modelParameters, controlBMAgamma, controlBMAgamma0, controlBMAnormal

Examples

  data(ensBMAtest)

  ensNames <- c("gfs","cmcg","eta","gasp","jma","ngps","tcwb","ukmo")

  obs <- paste("T2","obs", sep = ".")
  ens <- paste("T2", ensNames, sep = ".")

  tempTestData <- ensembleData( forecasts = ensBMAtest[,ens],
                                observations = ensBMAtest[,obs],
                                station = ensBMAtest[,"station"],
                                dates = ensBMAtest[,"vdate"],
                                forecastHour = 48,
                                initializationTime = "00")

  tempTrain <- trainingData( tempTestData, trainingDays = 30,
                             date  = "2008010100")

  tempTrainFit <- fitBMA( tempTrain, model = "normal")

## equivalent to
##    tempTrainFit <- fitBMAnormal( tempTrain)

  set.seed(0); exch <- sample(1:length(ens),replace=TRUE)
  
  tempTestData <- ensembleData( forecasts = ensBMAtest[,ens],
                                exchangeable = exch,
                                observations = ensBMAtest[,obs],
                                station = ensBMAtest[,"station"],
                                dates = ensBMAtest[,"vdate"],
                                forecastHour = 48,
                                initializationTime = "00")

[Package ensembleBMA version 5.1.8 Index]