fitBMA {ensembleBMA} | R Documentation |
Fits a Bayesian Modeling Averaging mixture model to a given training set.
fitBMA( ensembleData, control = NULL, model = NULL, exchangeable = NULL)
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 .
|
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
.
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.
|
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, 2009.
C. Fraley, A. E. Raftery, T. Gneiting, Using Bayesian Model Averaging to Calibrate Forecast Ensembles with Missing and Exchangeable Ensemble Members, (in preparation).
ensembleData
,
ensembleBMA
,
fitBMAgamma
,
fitBMAgamma0
,
fitBMAnormal
,
cdf
,
quantileForecast
,
modelParameters
,
controlBMAgamma
,
controlBMAgamma0
,
controlBMAnormal
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)