<p>I have panel data (N = 10, T = 20), which I intend to run a series of regressions on. I first want to see if my data are stationary in levels or in differences. To do this, I have been performing Levin-Lin-Chu unit root tests in Stata with the -xtunitroot llc- command. </p>

<p>My issue is that I noticed that you can select a maximum number of lags for AIC to select from and changing this maximum number changes the outcomes of my tests. I'm not sure what I'm supposed to set it at or whether I should be including lags at all.</p>

<p>For example, the Stata FAQ gives the following relevant example using the -xtunitroot llc- command: <a href="https://www.stata.com/features/overview/panel-data-unit-root-tests/" rel="nofollow noreferrer">https://www.stata.com/features/overview/panel-data-unit-root-tests/</a>. I don't understand why they add the "lags(aic 10)" component, whether I should add such a component, and if so, what number I should you instead of 10.</p>

<p>Any help is greatly appreciated!</p>

CC BY-SA 4.0
2019-06-21T10:08:36.117Z
yes you should include lags. I am not aware of any unit root test in which you dont have at least one lag included since Augmented Dickey Fuller test effectively tests whether the lag coefficients sum up to 1. The lags(aic 10) component allows you to select the number of lags before you perform the test. As the link says 10 is the default option for the test. AIC selects the number of lags so you may end up with fewer than 10. Since you only have N=10 you may want to plot your data. If there are clear trends or structural breaks then those typically induce a unit root.
Andrew M
CC BY-SA 4.0
2019-06-21T14:58:45.760Z
Thanks for your response! I don't think the link means that 10 is the default number for maximum lag length for the ADF component of the test - I think it means that the test by default uses the Bartlett kernel and this gave 10 lags in the LR component. I'm interested particularly in how to choose the maximum lag length for the ADF component of this LLC test.
leecarvallo
CC BY-SA 4.0
2019-06-28T15:49:02.270Z
So the typical approach for choosing max lag length is based on the data frequency. Its always safer to start with more and then reduce down. Ofcourse if you start with more then that eats into your observatioins but more lags also give more power for the unit root test so theres a tradeoff. So if you start with 10 what does the lag(aic 10) term give you?  For example if it chooses 5, then you might want to go back and use lag(aic 6) which will give you a larger sample to work with than when you choose lag(aic 10)
Andrew M
<econometrics><applied-econometrics><time-series><stata>
Should I include lags in an LLC unit root test?
leecarvallo
# Should I include lags in an LLC unit root test?

(Asked by: username_0 on 2019-06-20)

I have panel data (N = 10, T = 20), which I intend to run a series of regressions on. I first want to see if my data are stationary in levels or in differences. To do this, I have been performing Levin-Lin-Chu unit root tests in Stata with the -xtunitroot llc- command.

My issue is that I noticed that you can select a maximum number of lags for AIC to select from and changing this maximum number changes the outcomes of my tests. I'm not sure what I'm supposed to set it at or whether I should be including lags at all.

For example, the Stata FAQ gives the following relevant example using the -xtunitroot llc- command: <https://www.stata.com/features/overview/panel-data-unit-root-tests/>. I don't understand why they add the "lags(aic 10)" component, whether I should add such a component, and if so, what number I should you instead of 10.

Any help is greatly appreciated!

**Tags:** econometrics, applied-econometrics, time-series, stata
> **Comments:**
> **username_1**: yes you should include lags. I am not aware of any unit root test in which you dont have at least one lag included since Augmented Dickey Fuller test effectively tests whether the lag coefficients sum up to 1. The lags(aic 10) component allows you to select the number of lags before you perform the test. As the link says 10 is the default option for the test. AIC selects the number of lags so you may end up with fewer than 10. Since you only have N=10 you may want to plot your data. If there are clear trends or structural breaks then those typically induce a unit root.  
> **username_0**: Thanks for your response! I don't think the link means that 10 is the default number for maximum lag length for the ADF component of the test - I think it means that the test by default uses the Bartlett kernel and this gave 10 lags in the LR component. I'm interested particularly in how to choose the maximum lag length for the ADF component of this LLC test.  
> **username_1**: So the typical approach for choosing max lag length is based on the data frequency. Its always safer to start with more and then reduce down. Ofcourse if you start with more then that eats into your observatioins but more lags also give more power for the unit root test so theres a tradeoff. So if you start with 10 what does the lag(aic 10) term give you?  For example if it chooses 5, then you might want to go back and use lag(aic 6) which will give you a larger sample to work with than when you choose lag(aic 10)  

---

## 0 answers

