Learn R Programming

ensembleBMA (version 3.0-5)

trainingControl: Set Training Rule Argument

Description

Function for use in setting training rules in ensembleBMA.

Usage

trainingControl(length = 30, lag = NA)

Arguments

length
The number of time steps (e.g. days) in the training period.
lag
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.

Value

  • An list with components specifying length and lag that can be use to set the trainingRule argument in ensembleData.

See Also

ensembleBMA

Examples

Run this code
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 = trainingControl(length=25,lag=2))
 
  slpTestFitTD <- fitBMAnormal(trainDat)

Run the code above in your browser using DataLab