Learn R Programming

UComp (version 5.0.4)

slide: slide

Description

Rolling forecasting of a matrix of time series

Usage

slide(
  y,
  orig,
  forecFun,
  ...,
  h = 12,
  step = 1,
  output = TRUE,
  window = NA,
  parallel = FALSE
)

Value

A vector with all the dimensions

Arguments

y

a vector or matrix of time series

orig

starting forecasting origin

forecFun

user function that implements forecasting methods

...

rest of inputs to forecFun function

h

forecasting horizon

step

observations ahead to move the forecasting origin

output

output TRUE/FALSE

window

fixed window width in number of observations (NA for non fixed)

parallel

run forecasts in parallel

Author

Diego J. Pedregal

Details

Takes a time series and run forecasting methods implemented in function forecFun h steps ahead along the time series y, starting at forecasting origin orig, and moving step observations ahead. Forecasts may be run in parallel by setting parallel to TRUE. A fixed window width may be specified with input window. The output is of dimensions (h, nOrigs, nModels, nSeries)

See Also

colMedians, rowMedians, tests, sumStats, gaussTest, ident, cusum, varTest, conv, armaFilter, dif, roots, zplane, acft, plotSlide, Accuracy, tsDisplay, size

Examples

Run this code
if (FALSE) slide(AirPassengers, 100, forecFun)

Run the code above in your browser using DataLab