trainingData {ensembleBMA} | R Documentation |
Extracts the training data corresponding to a given date and training rule.
trainingData( ensembleData, date, trainingRule = list( length = NA, lag = NA), exchangeable = NULL)
ensembleData |
An ensembleData object that includes, ensemble
forecasts, observations and dates.
|
date |
The date for which the training data is desired. |
trainingRule |
A list giving the length and lag for the training
period. The length gives the number of time steps (e.g. days)
in the training period, and the lag gives the number of time steps
ahead of the most recent date in the training period for which the
forecast is valid. There is no default.
|
exchangeable |
A numeric or character vector or factor indicating groups of
ensemble members that are exchangeable (indistinguishable).
The modeling will have equal weights and parameters within each
group.
The default determines exchangeability from ensembleData .
|
The training rule uses the most recent days for the given period regardless of whether or not they are consecutive.
An ensembleData
object corresponding to the training data for
the given date relative to ensembleData
.
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:3309–3320, 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, May 2008.
C. Fraley, A. E. Raftery, T. Gneiting, BMA Forecasting with Missing and Exchangeable Ensemble Members, in preparation.
ensembleBMA
,
fitBMA
,
trainingControl
## Not run: data(slpTest) memberLabels <- c("AVN","GEM","ETA","NGM","NOGAPS") slpTestData <- ensembleData( forecasts = slpTest[ ,memberLabels], observations = slpTest$obs, dates = slpTest$date) trainDat <- trainingData(slpTestData, date = "2000063000", trainingRule = list(length=30,lag=2)) slpTestFitTD <- fitBMAnormal(trainDat) ## End(Not run)