fitBMAgamma0 | R Documentation |

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

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

`ensembleData` |
An |

`control` |
A list of control values for the fitting functions. The defaults are
given by the function |

`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 override any specification of
exchangeability in |

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`

.

A list with the following output components:

`prob0coefs` |
The fitted coefficients in the model for the point mass at 0 (probability of zero precipitation) for each member of the ensemble. |

`biasCoefs` |
The fitted coefficients in the model for the mean of nonzero observations for each member of the ensemble (used for bias correction). |

`varCoefs` |
The fitted coefficients for the model for the variance of nonzero observations (these are the same for all members of the ensemble). |

`weights` |
The fitted BMA weights for the gamma components for each ensemble member. |

`nIter` |
The number of EM iterations. |

`power` |
A scalar value giving to the power by which the data was transformed
to fit the models for the point mass at 0 and the bias model.
The untransformed forecast is used to fit the variance model.
This is input as part of |

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*.

`ensembleData`

,
`controlBMAgamma0`

,
`ensembleBMAgamma0`

,
`cdf`

,
`quantileForecast`

,
`modelParameters`

data(ensBMAtest) ensMemNames <- c("gfs","cmcg","eta","gasp","jma","ngps","tcwb","ukmo") obs <- paste("PCP24","obs", sep = ".") ens <- paste("PCP24", ensMemNames, sep = ".") prcpTestData <- ensembleData( forecasts = ensBMAtest[,ens], dates = ensBMAtest[,"vdate"], observations = ensBMAtest[,obs], station = ensBMAtest[,"station"], forecastHour = 48, initializationTime = "00") ## Not run: # R check prcpTrain <- trainingData( prcpTestData, trainingDays = 30, date = "2008010100") ## End(Not run) # quick run only; use more training days for forecasting prcpTrain <- trainingData( prcpTestData, trainingDays = 10, date = "2008010100") prcpTrainFit <- fitBMAgamma0( prcpTrain) ## equivalent to ## prcpTrainFit <- fitBMA( prcpTrain, model = "gamma0")

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.