Learn R Programming

ensembleBMA (version 2.0)

fitBMAnormal: BMA for a mixture of normals.

Description

Fits a Baysian Model Averaging mixture of normals to ensemble forecasting data.

Usage

fitBMAnormal( ensembleData, control = controlBMAnormal())

Arguments

ensembleData
An ensembleData object with forecasts, observations and dates for precipitation.
control
A list of control values for the fitting functions. The defaults are given by the function controlBMAnormal.

Value

  • A list with the following output components:
  • biasCoefsThe fitted bias-correction coefficients.
  • sdThe fitted standard deviations for the mixture of normals model.
  • weightsThe fitted weights for the mixture of normals model.
  • nIterThe number of EM iterations.

Details

This function fits a BMA model to a training data set. It is called by ensembleBMAnormal, which produces a sequence of fits over a larger precipitation data set. The following methods are available for the output of fitBMA: gridForecastBMA, quantileForecastBMA, and bmaModelParameters.

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.

See Also

ensembleData, controlBMAnormal, ensembleBMAnormal, gridForecastBMA, quantileForecastBMA, bmaModelParameters

Examples

Run this code
data(slp)

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

  DATE <- sort(unique(slpData$dates))[27]
  trainDat <- trainingData( slpData, date = DATE, trainingRule=list(length=25,lag=2))
  slpFit25a <- fitBMA(trainDat, model = "normal")

  D <- as.numeric(slpData$dates) <= 25
  slpFit25b <- fitBMA(slpData[D, ], model = "normal")

Run the code above in your browser using DataLab