iForecast.var | R Documentation |
It generates multistep forecasts of machine learning VAR.
iForecast.var(object, n.ahead)
object |
The object generated by |
n.ahead |
The number of out-of-sample forecasting periods. If n.ahead=1, it is one-step forecast; if n.ahead>1, it computes multistep forecasts by recursive method. |
This function generates multistep forecasts of machine learning VAR.
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
data(macrodata)
y=timeSeries::as.timeSeries(macrodata[,-1])
VLD=window(y,start="2019-01-01",end=end(y))
#OUT1=tts.var(data=y,
# p=3,
# method="enet",
# train.end="2018-12-01",
# type=c("none","trend","season","both")[1])
#fcst_ml=iForecast.var(OUT1, n.ahead=nrow(VLD))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.