I have a time-series that I am trying to fit an autoregression model to. I am trying to use the tsCV method. From the help page I find this:

tsCV computes the forecast errors obtained by applying forecastfunction to subsets of the time series y using a rolling forecast origin.

and from the details section I see

Let y contain the time series y[1:T]. Then forecastfunction is applied successively to the time series y[1:t], for t=1,…,T-h, making predictions f[t+h].

In the examples we have

far2 <- function(x, h){forecast(Arima(x, order=c(2,0,0)), h=h)}
e <- tsCV(lynx, far2, h=1)

meaning that forecast(Arima(x,order=c(2,0,0)),h=h) would be applied successively to the time series lynx using the rolling forecast origin. To make this only slightly more complicated, there is also the window argument which provides a rolling window instead of a rolling origin. My question is: when we apply forecast(Arima(x,order=c(2,0,0)),h=h) repeatedly are we repeatedly training a new ARIMA model on the new window of the time-series data? Or, is there some how and somewhere a persistent ARIMA model that is trained only once and then referenced for the further calls of the forecast method?


1 Answer 1


It is repeatedly training a new ARIMA model on each subset of data.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.