Time Series Analysis - What lag level is appropriate? In my undergraduate econometrics class we were taught the basics of time series analysis. We were basically told to use a model with a one period time lag (lag = 1). However, I wonder that there must be cases where more lags might be appropriate. What would those instances look like? Is there a way to find what might be the optimal number of lags to look at for a particular time series. Could you guide me to appropriate resources that deal with the intuitive Math for this and possibly an implementation of how to find optimal lags in R if possible.
Thanks for your help!
In your course they were likely talking about some specific case. Generally you often see more than one lag across applied work.
For example, one of standard time series models is the Autoregressive Distributed Lag (ARDL) model. In such model you often need to include several lags. The general ARDL(p,q) model looks like:
$$ y_t = \beta_0 + \sum_{i=1}^p \beta_i y_{t-i}+ \sum_{j=0}^q \gamma_jx_{t-j} +e_t$$
where you would typically want to choose the lag order to remove autocorrelation from the model. This is just an example, in many time series models you will want to include multiple lags for example also in VAR, AR, ARIMA and many other models. It is impossible to provide exhaustive overview of these models but you can have look at Verbeek (2008). A Guide to Modern Econometrics. 4th ed chapters 8-9 for an overview.
One way of how to select optimum number or lags is with information criteria such as Akaike or Schwartz Bayesian Information criterion (again just examples there are more of these - see the above mentioned source).
In R there are multiple ways how to implement these. One example is &quot;tsDyn&quot; package - this is mainly used to select optimum number of lags for VAR. For example you could run:
install.packages(&quot;tsDyn&quot;) 
require(&quot;tsDyn&quot;)
data(barry)
test1 &lt;- lags.select(barry, lag.max = 12)
test1
Best AIC:  lag= 12 
Best BIC:  lag= 2 
Best HQ :  lag= 2 

So in the data above based on Akaike (AIC) we should include 12 lags in VAR model run on these data, according to Schwartz (BIC) and Hannan-Quinn (HQ) only 2 lags. As you can see this criterions do not always agree together so you also have to exercise some discretion but it is beyond scope of this SE answer to fully explain in all cases how to apply these. You can again have a look at the textbook I recommended.