ensembleBMA {ensembleBMA} | R Documentation |
Fits a BMA mixture model to ensemble forecasts. Allows specification of a model, training rule, and forecasting dates.
ensembleBMA( ensembleData, trainingDays, dates = NULL, control = NULL, model = NULL, exchangeable = NULL, minCRPS = NULL)
ensembleData |
An ensembleData object including ensemble forecasts with the
corresponding verifying observations and their dates.
Missing values (indicated by NA ) are allowed.
|
dates |
The dates for which BMA forecasting models are desired.
By default, this will be all dates in ensembleData
for which modeling is allowed given training rule.
|
trainingDays |
An integer giving the number of time steps (e.g. days) in the training period. There is no default. |
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" , typically used for temperature
or pressure data, and "gamma0" ,
typically used 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 .
|
minCRPS |
A logical variable indicating whether or not to add a postprocessing step after a normal BMA fit to choose the standard deviation so as to minimize the CRPS for the training data. This argument is used only for normal models, and the default is to not do the CRPS minimization for those models because it may require consderably more computation time, expecially when there are many ensemble members. |
If dates are specified in dates
that cannot be forecast
with the training rule, the corresponding BMA model parameter outputs will
be missing (NA
) but not NULL
.
The training rule uses the number of days corresponding to its
length
regardless of whether or not the dates are consecutive.
The following methods are available for the output of ensembleBMA
:
cdf
, quantileForecast
, modelParameters
,
brierScore
, crps
, CRPS
and MAE
.
A list with the following output components:
dateTable |
The table of observations corresponding to the dates in x
in chronological order.
|
trainingDays |
The number of days in the training period as specified in input. |
... |
One or more components corresponding to fitted coefficients for the model. |
weights |
The fitted BMA weights for the mixture components for each ensemble member at each date. |
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.
J. M. Sloughter, T.Gneiting and A. E. Raftery, Probabilistic wind speed forecasting using ensembles and Bayesian model averaging, Technical Report No. 544, Department of Statistics, University of Washington, October 2008.
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 forecasts with missing and exchangeable ensemble members (in preparation).
ensembleData
,
ensembleBMAnormal
,
ensembleBMAgamma0
,
ensembleBMAgamma
,
cdf
,
quantileForecast
,
modelParameters
,
brierScore
,
crps
,
MAE
,
controlBMAnormal
,
controlBMAgamma0
,
controlBMAgamma
data(ensBMAtest) ensMemNames <- c("gfs","cmcg","eta","gasp","jma","ngps","tcwb","ukmo") obs <- paste("T2","obs", sep = ".") ens <- paste("T2", ensMemNames, sep = ".") tempTestData <- ensembleData( forecasts = ensBMAtest[,ens], dates = ensBMAtest[,"vdate"], observations = ensBMAtest[,obs], station = ensBMAtest[,"station"], forecastHour = 48, initializationTime = "00") tempTestFit <- ensembleBMA( tempTestData, trainingDays = 30, model = "normal") ## equivalent to ## tempTestFit <- ensembleBMAnormal( tempTestData, trainingDays = 30)