trainingData {ensembleBMA}R Documentation

Training data for a given date and training rule.

Description

Extracts the training data corresponding to a given date and training rule.

Usage

trainingData( ensembleData, date, trainingRule = list(length=30, lag=2)) 

Arguments

ensembleData An ensembleData object including ensemble forecasts, observations and dates of precipitation.
date The date for which the training data is desired.
trainingRule A list giving the length and lag for the training period. The default is to use a 30 day training period for a forecast 2 days ahead of the last day in the training period.

Details

The training rule uses the most recent days for the given period regardless of whether or not they are consecutive.

Value

An ensembleData object corresponding to the training data for the given date relative to ensembleData.

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.

J. M. Sloughter, A. E. Raftery, T. Gneiting and C. Fraley, Probabilistic Quantitative Precipitation Forecasting using Bayesian Model Averaging, Technical Report No. 496R, Department of Statistics, University of Washington, October 2006 (to appear in Montly Weather Review).

See Also

ensembleBMA, fitBMA

Examples

## Not run: 
  data(slp)

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

  trainDat <- trainingData(slpData, date = "2000063000",
                           trainingRule = list(length=30,lag =2))
 
  slpFitTD <- fitBMAnormal(trainDat)
## End(Not run)

[Package ensembleBMA version 2.0 Index]