<p>I don't have advice specific to error correcting model (ECM) setting, but in undergraduate applied econometric class they gave us the generic advice to continue to extend lags in the model until the residuals of the fitted model were serially uncorrelated. For example, in the US life expectancy data, residuals of male life expectancy is serially uncorrelated in the AR(5) model but not the AR(4) model. You can see this for yourself with the following Stata code:   </p>

<pre><code>use http://www.stata-press.com/data/r8/uslifeexp.dta
tsset year, yearly
reg le_male L(1/4).le_male
estat durbinalt, small
reg le_male L(1/5).le_male
estat durbinalt, small
</code></pre>

<p>The <a href="http://www.stata.com/manuals13/tsvecintro.pdf" rel="nofollow">Stata documentation for the vector error-correction</a> models also seems to roughly follow this approach but it looks like it is automated under the <strong>varsoc</strong> function and additionally the AIC, HQIC, and SBIC are all generated programmatically. </p>

<blockquote>
  <p>To test for cointegration or fit cointegrating VECMs, we must specify
  how many lags to include. Building on the work of Tsay (1984) and
  Paulsen (1984), Nielsen (2001) has shown that the methods implemented
  in varsoc can be used to determine the lag order for a VAR model with
  I(1) variables. As can be seen from (9), the order of the
  corresponding VECM is always one less than the VAR. vec makes this
  adjustment automatically, so we will always refer to the order of the
  underlying VAR. The output below uses varsoc to determine the lag
  order of the VAR of the average housing prices in Dallas and
  Houston....</p>
  
  <p>We will use two lags for this bivariate model because the Hannan–Quinn
  information criterion (HQIC) method, Schwarz Bayesian information
  criterion (SBIC) method, and sequential likelihood-ratio (LR) test all
  chose two lags, as indicated by the “*” in the output.</p>
</blockquote>

<pre><code>. clear all

. use http://www.stata-press.com/data/r13/txhprice

. varsoc dallas houston

   Selection-order criteria
   Sample:  1990m5 - 2003m12                    Number of obs      =       164
  +---------------------------------------------------------------------------+
  |lag |    LL      LR      df    p      FPE       AIC      HQIC      SBIC    |
  |----+----------------------------------------------------------------------|
  |  0 |  299.525                      .000091  -3.62835  -3.61301  -3.59055  |
  |  1 |  577.483  555.92    4  0.000  3.2e-06   -6.9693  -6.92326  -6.85589  |
  |  2 |  590.978  26.991*   4  0.000  2.9e-06*  -7.0851* -7.00837* -6.89608* |
  |  3 |  593.437   4.918    4  0.296  2.9e-06  -7.06631  -6.95888  -6.80168  |
  |  4 |  596.364  5.8532    4  0.210  3.0e-06  -7.05322   -6.9151  -6.71299  |
  +---------------------------------------------------------------------------+
   Endogenous:  dallas houston
    Exogenous:  _cons
</code></pre>

<p>If, as @GraemeWalsh suggests, you would like to use an <a href="http://davegiles.blogspot.com/2013/03/ardl-models-part-i.html" rel="nofollow">auto-regressive distributed lags methodology</a> (ARDL) you can do so without having to code it up yourself.</p>

<pre><code>use http://www.stata-press.com/data/r13/txhprice
sort t
net install ardl.pkg
ardl dallas houston,  maxlag(4)


ARDL regression
Model: level

Sample:  1990m5 - 2003m12 
Number of obs  = 164
Log likelihood = 313.86816
R-squared      = .96315461
Adj R-squared  = .96246376
Root MSE       = .03613756

------------------------------------------------------------------------------
      dallas |      Coef.   Std. Err.      t    P&gt;|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      dallas |
         L1. |    .427744   .0789194     5.42   0.000      .271886     .583602
         L2. |   .1747019   .0720507     2.42   0.016     .0324089    .3169948
             |
     houston |   .3404766   .0567884     6.00   0.000     .2283252     .452628
       _cons |   .7276476   .2061803     3.53   0.001     .3204618    1.134833
------------------------------------------------------------------------------
</code></pre>

CC BY-SA 3.0
2016-04-20T20:09:18.837Z
While the _specific-to-general_ approach (extending the lag length in the model until the residuals are white noise) is commonly used, it is, in fact, better (more structured) to use the _general-to-specific_ approach (begin with a larger model and reduce it's size) often recommended by David Hendry. I'd say to the OP, build an ARDL and follow Hendry's methodology, which is the soundest, in my opinion.
Graeme Walsh
CC BY-SA 3.0
2015-08-14T12:58:22.327Z
2016-04-20T20:22:55.583Z
2016-04-20T20:22:55.583Z
BKay
<p>I am using time series data in economic model estimation. I want determine proper lag for Error Correcting Model (<a href="https://en.wikipedia.org/wiki/Error_correction_model" rel="nofollow">ECM</a>) model for example. I can check <a href="https://en.wikipedia.org/wiki/Akaike_information_criterion" rel="nofollow">AIC</a>, SC and HQ criterion for determine proper lag. But I am not sure about max lag that I must start with it. What is max lag for annual, quarterly and monthly time series. </p>

<p>Is max lag would be changed if I used another econometric approach for example ARDL, VAR or VECM? </p>

<econometrics><time-series><applied-econometrics>
How should one determine the proper number of lags in a time series regression?
Huseyin
# How should one determine the proper number of lags in a time series regression?

(Asked by: username_0 on 2015-05-24)

I am using time series data in economic model estimation. I want determine proper lag for Error Correcting Model ([ECM](https://en.wikipedia.org/wiki/Error_correction_model)) model for example. I can check [AIC](https://en.wikipedia.org/wiki/Akaike_information_criterion), SC and HQ criterion for determine proper lag. But I am not sure about max lag that I must start with it. What is max lag for annual, quarterly and monthly time series.

Is max lag would be changed if I used another econometric approach for example ARDL, VAR or VECM?

**Tags:** econometrics, time-series, applied-econometrics

---

## 1 answers

### Answer by username_1 on 2015-08-14. Score: 6 | Accepted answer

I don't have advice specific to error correcting model (ECM) setting, but in undergraduate applied econometric class they gave us the generic advice to continue to extend lags in the model until the residuals of the fitted model were serially uncorrelated. For example, in the US life expectancy data, residuals of male life expectancy is serially uncorrelated in the AR(5) model but not the AR(4) model. You can see this for yourself with the following Stata code:   
use http://www.stata-press.com/data/r8/uslifeexp.dta
tsset year, yearly
reg le_male L(1/4).le_male
estat durbinalt, small
reg le_male L(1/5).le_male
estat durbinalt, small

The Stata documentation for the vector error-correction models also seems to roughly follow this approach but it looks like it is automated under the varsoc function and additionally the AIC, HQIC, and SBIC are all generated programmatically. 

To test for cointegration or fit cointegrating VECMs, we must specify
  how many lags to include. Building on the work of Tsay (1984) and
  Paulsen (1984), Nielsen (2001) has shown that the methods implemented
  in varsoc can be used to determine the lag order for a VAR model with
  I(1) variables. As can be seen from (9), the order of the
  corresponding VECM is always one less than the VAR. vec makes this
  adjustment automatically, so we will always refer to the order of the
  underlying VAR. The output below uses varsoc to determine the lag
  order of the VAR of the average housing prices in Dallas and
  Houston....
We will use two lags for this bivariate model because the Hannan–Quinn
  information criterion (HQIC) method, Schwarz Bayesian information
  criterion (SBIC) method, and sequential likelihood-ratio (LR) test all
  chose two lags, as indicated by the “*” in the output.

. clear all

. use http://www.stata-press.com/data/r13/txhprice

. varsoc dallas houston

   Selection-order criteria
   Sample:  1990m5 - 2003m12                    Number of obs      =       164
  +---------------------------------------------------------------------------+
  |lag |    LL      LR      df    p      FPE       AIC      HQIC      SBIC    |
  |----+----------------------------------------------------------------------|
  |  0 |  299.525                      .000091  -3.62835  -3.61301  -3.59055  |
  |  1 |  577.483  555.92    4  0.000  3.2e-06   -6.9693  -6.92326  -6.85589  |
  |  2 |  590.978  26.991*   4  0.000  2.9e-06*  -7.0851* -7.00837* -6.89608* |
  |  3 |  593.437   4.918    4  0.296  2.9e-06  -7.06631  -6.95888  -6.80168  |
  |  4 |  596.364  5.8532    4  0.210  3.0e-06  -7.05322   -6.9151  -6.71299  |
  +---------------------------------------------------------------------------+
   Endogenous:  dallas houston
    Exogenous:  _cons

If, as @GraemeWalsh suggests, you would like to use an auto-regressive distributed lags methodology (ARDL) you can do so without having to code it up yourself.
use http://www.stata-press.com/data/r13/txhprice
sort t
net install ardl.pkg
ardl dallas houston,  maxlag(4)


ARDL regression
Model: level

Sample:  1990m5 - 2003m12 
Number of obs  = 164
Log likelihood = 313.86816
R-squared      = .96315461
Adj R-squared  = .96246376
Root MSE       = .03613756

------------------------------------------------------------------------------
      dallas |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      dallas |
         L1. |    .427744   .0789194     5.42   0.000      .271886     .583602
         L2. |   .1747019   .0720507     2.42   0.016     .0324089    .3169948
             |
     houston |   .3404766   .0567884     6.00   0.000     .2283252     .452628
       _cons |   .7276476   .2061803     3.53   0.001     .3204618    1.134833
------------------------------------------------------------------------------

> **Comments:**
> **username_2**: While the _specific-to-general_ approach (extending the lag length in the model until the residuals are white noise) is commonly used, it is, in fact, better (more structured) to use the _general-to-specific_ approach (begin with a larger model and reduce it's size) often recommended by David Hendry. I'd say to the OP, build an ARDL and follow Hendry's methodology, which is the soundest, in my opinion.  

---

