3
$\begingroup$

I'm wondering: how do I select the number of previous time steps to use to predict the current one?

I'm just plotting the autocorrelation plot and picking previous time steps that have statistically significant correlation with the present.

Is this a proper way of doing this? I'm basically just wondering how many time steps should I include.

$\endgroup$
  • $\begingroup$ See also 1 and 2 which are somewhat related. $\endgroup$ – Richard Hardy Jul 30 '16 at 19:34
  • $\begingroup$ There are many kind of time series model. It's not clear which kind of model you refer to. Advice is fairly likely to differ. $\endgroup$ – Glen_b -Reinstate Monica Aug 1 '16 at 9:17
5
$\begingroup$

Looking at individual autocorrelations may help in simple cases, but this way you could miss lags that are important only jointly but not individually. Alternatively, you may try the following:

  1. Select a large number of lags and estimate a penalized model (e.g. using LASSO, ridge or elastic net regularization). The penalization should diminish the impact of irrelevant lags and this way effectively do the selection. There would be some inconvenience in that cross validation is normally used for selecting penalty intensity, and cross validation is a bit tricky with time series. But this is still doable, no doubt about it.
  2. Try a number of different lag combinations and either
    (i) select the best of them according to an information criterion (AIC should do well in terms of forecasting as it is an efficient selector) or out-of-sample performance OR
    (ii) combine some or even all of them weighting the models based on their likelihood, information criteria or the like. Refer to model averaging and forecast combination literature for detailed recipes.
    (ii) would often do better than (i) in terms of forecasting, especially if you are selecting from a large number of alternatives.

Another alternative is to leave the job to some automated procedure like the auto.arima function in "forecast" package in R. The algorithm for auto.arima is available in Hyndman & Khandakar (2008).

References:

  • Hyndman, Rob J., and Yeasmin Khandakar. "Automatic Time Series Forecasting: The forecast Package for R." Journal of Statistical Software 27.i03 (2008).
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy