<p>I think the source of your confusion may be due to the inclusion of the linear trend term in your test. If you exclude the linear trend from the test then you will almost certainly find evidence of a unit root. There is actually an open debate as to whether GDP is trend stationary (i.e. stationary once you remove the linear trend) or difference stationary (i.e. stationary once you take a difference of the series). For example, see: <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=866624" rel="nofollow noreferrer">https://papers.ssrn.com/sol3/papers.cfm?abstract_id=866624</a></p>

<p>To help you better understand it is possible to illustrate this with a simple model with a lag and a trend (this also generalizes for two lags but it is good to keep things simple). Consider the following model of GDP:</p>

<p><span class="math-container">$y_{t}=\alpha+\beta y_{t-1}+\gamma t+e_{t}$</span></p>

<p>If we subtract <span class="math-container">$y_{t-1}$</span> from both sides we get that</p>

<p><span class="math-container">$\Delta y_{t}=\alpha+(\beta-1) y_{t-1}+\gamma t+e_{t}$</span></p>

<p>where the null hypothesis of our unit root test is that <span class="math-container">$(1-\beta)=0$</span>. The test depends on whether we account for the constant (<span class="math-container">$\alpha$</span>) and the linear trend (<span class="math-container">$\gamma$</span>) or not. If the true process has a linear trend but <span class="math-container">$\beta&lt;1$</span> then you will not detect a unit root when including a linear trend in the test. On the other hand if you estimate the model without a linear trend and conduct the unit root test without an exogenous linear trend then the unit root test should not reject the null since the estimate for <span class="math-container">$\beta$</span> will move towards 1 to try and capture the linear trend. For this same reason if you have large structural breaks in the data the estimate of <span class="math-container">$\beta$</span> will move towards 1 and suggest evidence of a unit root (regardless of an inclusion or a linear trend or not).</p>

<p>Long story short if you include the linear trend in the test even if you exclude it from the estimated regression model then you are unlikely to find evidence of a unit root in an empirical process where a linear trend dominates unless the data were even more non-stationary than it appears.</p>

CC BY-SA 4.0
2020-04-23T22:43:58.313Z
The linear trend in $y_{t}=\alpha+\beta y_{t-1}+\gamma t+e_{t}$ is not exogenous. That's not the maintained hypothesis of unit root tests.
Michael
CC BY-SA 4.0
2020-04-23T23:23:35.427Z
How is the linear trend $t$ not exogenous?
Andrew M
CC BY-SA 4.0
2020-04-23T23:37:34.557Z
@Michael see:https://en.wikipedia.org/wiki/Augmented_Dickey%E2%80%93Fuller_test and http://www.eviews.com/help/helpintro.html#page/content/advtimeser-Unit_Root_Testing.html.
Andrew M
CC BY-SA 4.0
2020-04-24T01:21:02.403Z
Whatever that says, it's incorrect. Try generating a series using that exact equation and see what you get. Take $β=1$, the series will look nothing like a random walk with exogenous linear trend. In the even simpler case, are you saying that the unconditional mean of $y_t=α+β y_{t−1}+e_t$, stationary or otherwise, is your "obviously exogenous" constant $α$?
Michael
CC BY-SA 4.0
2020-04-24T01:27:29.690Z
Ok well if you arent even going to look at how Eviews produces the tests then there is no point in discussing this further. And no, the unconditional mean of an autoregressive process is not $\alpha$ it is $\alpha/(1-\beta)$.
Andrew M
CC BY-SA 4.0
2020-04-24T01:31:21.750Z
Including a trend into a regression is how the statistic is computed. That is the regression being run---it's not the same as the model of DGP. Is $\alpha$ exogenous or not? Answer is the same for both for unit root and non-unit root. If the intercept is exogenous, then it's necessarily the unconditional mean.
Michael
CC BY-SA 4.0
2020-04-24T01:44:21.720Z
The difference is the regression being run vs. the model. That it is the unconditional mean necessarily follows from your claim of exogeneity, which is blatantly incorrect.
Michael
CC BY-SA 4.0
2020-04-24T01:53:59.577Z
I agree there is a difference between the model and the DGP. Im not sure I understand what definition of exogeneity you are using. Perhaps you could clarify.
Andrew M
CC BY-SA 4.0
2020-04-23T22:17:47.560Z
2020-04-24T04:15:23.847Z
2020-04-24T04:15:23.847Z
Andrew M
<p>On surface level there does not seem to be anything wrong with the test. </p>

<p>There might be a breakpoint in your series but that should bias the unit root test in favor of the null hypothesis of non-stationarity (although you might still want to check that and use some breakpoint unit root test in that case).</p>

<p>Also, even if you do everything right you might still get significant result even if we know that GDP should have unit root. This is statistics - the test is not some sort of truth checking machine it is all based on probability. For example, with p value 0.0186 even if your test has power 1 you would expect about 2 false positives out of 100 tests. Moreover, you definitely won’t have 1 power and with ADF test you usually need a lot of observations to get to 0.8 power which is considered good so the probability the result is not correct is even higher. You might want to try to run some alternative unit root test with null of stationarity and alternative of unit root (for example KPSS test). In any case when building some regressions I would always assume that GDP has a unit root due to overwhelming evidence from other studies and not just rely on the unit root test.</p>

CC BY-SA 4.0
2020-04-24T01:26:17.573Z
Not controlling for serial correlation in error term will make a non-unit root series appear unit-root-like. The (suggested) issue here is the opposite one.
Michael
CC BY-SA 4.0
2020-04-24T01:29:54.407Z
@Michael you are right, my bad I will correct that, although it’s still important to get lags right as overfitting lowers the power of the test although that’s probably not problem with only two lags
1muflon1
CC BY-SA 4.0
2020-04-24T01:40:44.393Z
My guess is the plot of the de-trended series from the ADF regression would look like a stationary series. For an ADF t-stat to have p-value of 0.02 basically means running an AR(1) regression on the series gives a estimate far enough below 1. So at least if you eyeball the series it would appear borderline stationary. With trend this would be less visible as the linear trend dominates the stochastic trend. It would be interesting to know which country's GDP this is.
Michael
CC BY-SA 4.0
2020-04-23T11:13:32.277Z
2020-04-24T10:08:52.733Z
2020-04-24T10:08:52.733Z
1muflon1
<p>I've plotted my data log(GDP) which displays an albeit small upward trend.</p>

<p><a href="https://i.sstatic.net/WScrh.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/WScrh.png" alt="enter image description here"></a></p>

<p>However, after performing an ADF unit root test log(GDP) it suggests that I can reject H0 [that there is a unit root] at the 5% level. I tested the level effect with trend and intercept due to the nature of the graph. Both the intercept and trend are statistically significant and removing the trend only makes the t statistic lower so that you can reject H0 at the 1% level.</p>

<p><a href="https://i.sstatic.net/U21Mg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/U21Mg.png" alt="enter image description here"></a> </p>

<p>Why might I be getting this result as from the graph the data definitely looks nonstationary.</p>

CC BY-SA 4.0
2020-04-23T10:04:32.200Z
Can you share you ADF specification?
1muflon1
CC BY-SA 4.0
2020-04-23T22:42:44.797Z
Surely this is not US GDP, correct?
Michael
<econometrics><gdp><time-series>
Unit root testing in Eviews
Mark
# Unit root testing in Eviews

(Asked by: username_0 on 2020-04-23)

I've plotted my data log(GDP) which displays an albeit small upward trend.

[![enter image description here](https://i.sstatic.net/WScrh.png)](https://i.sstatic.net/WScrh.png)

However, after performing an ADF unit root test log(GDP) it suggests that I can reject H0 [that there is a unit root] at the 5% level. I tested the level effect with trend and intercept due to the nature of the graph. Both the intercept and trend are statistically significant and removing the trend only makes the t statistic lower so that you can reject H0 at the 1% level.

[![enter image description here](https://i.sstatic.net/U21Mg.png)](https://i.sstatic.net/U21Mg.png)

Why might I be getting this result as from the graph the data definitely looks nonstationary.

**Tags:** econometrics, gdp, time-series
> **Comments:**
> **username_1**: Can you share you ADF specification?  
> **username_2**: Surely this is not US GDP, correct?  

---

## 2 answers

### Answer by username_3 on 2020-04-23. Score: 1

I think the source of your confusion may be due to the inclusion of the linear trend term in your test. If you exclude the linear trend from the test then you will almost certainly find evidence of a unit root. There is actually an open debate as to whether GDP is trend stationary (i.e. stationary once you remove the linear trend) or difference stationary (i.e. stationary once you take a difference of the series). For example, see: <https://papers.ssrn.com/sol3/papers.cfm?abstract_id=866624>

To help you better understand it is possible to illustrate this with a simple model with a lag and a trend (this also generalizes for two lags but it is good to keep things simple). Consider the following model of GDP:

$y\_{t}=\alpha+\beta y\_{t-1}+\gamma t+e\_{t}$

If we subtract $y\_{t-1}$ from both sides we get that

$\Delta y\_{t}=\alpha+(\beta-1) y\_{t-1}+\gamma t+e\_{t}$

where the null hypothesis of our unit root test is that $(1-\beta)=0$. The test depends on whether we account for the constant ($\alpha$) and the linear trend ($\gamma$) or not. If the true process has a linear trend but $\beta<1$ then you will not detect a unit root when including a linear trend in the test. On the other hand if you estimate the model without a linear trend and conduct the unit root test without an exogenous linear trend then the unit root test should not reject the null since the estimate for $\beta$ will move towards 1 to try and capture the linear trend. For this same reason if you have large structural breaks in the data the estimate of $\beta$ will move towards 1 and suggest evidence of a unit root (regardless of an inclusion or a linear trend or not).

Long story short if you include the linear trend in the test even if you exclude it from the estimated regression model then you are unlikely to find evidence of a unit root in an empirical process where a linear trend dominates unless the data were even more non-stationary than it appears.

> **Comments:**
> **username_2**: The linear trend in $y_{t}=\alpha+\beta y_{t-1}+\gamma t+e_{t}$ is not exogenous. That's not the maintained hypothesis of unit root tests.  
> **username_3**: How is the linear trend $t$ not exogenous?  
> **username_3**: @Michael see:https://en.wikipedia.org/wiki/Augmented_Dickey%E2%80%93Fuller_test and http://www.eviews.com/help/helpintro.html#page/content/advtimeser-Unit_Root_Testing.html.  
> **username_2**: Whatever that says, it's incorrect. Try generating a series using that exact equation and see what you get. Take $β=1$, the series will look nothing like a random walk with exogenous linear trend. In the even simpler case, are you saying that the unconditional mean of $y_t=α+β y_{t−1}+e_t$, stationary or otherwise, is your "obviously exogenous" constant $α$?  
> **username_3**: Ok well if you arent even going to look at how Eviews produces the tests then there is no point in discussing this further. And no, the unconditional mean of an autoregressive process is not $\alpha$ it is $\alpha/(1-\beta)$.  
> **username_2**: Including a trend into a regression is how the statistic is computed. That is the regression being run---it's not the same as the model of DGP. Is $\alpha$ exogenous or not? Answer is the same for both for unit root and non-unit root. If the intercept is exogenous, then it's necessarily the unconditional mean.  
> **username_2**: The difference is the regression being run vs. the model. That it is the unconditional mean necessarily follows from your claim of exogeneity, which is blatantly incorrect.  
> **username_3**: I agree there is a difference between the model and the DGP. Im not sure I understand what definition of exogeneity you are using. Perhaps you could clarify.  

---

### Answer by username_1 on 2020-04-23. Score: 0

On surface level there does not seem to be anything wrong with the test.

There might be a breakpoint in your series but that should bias the unit root test in favor of the null hypothesis of non-stationarity (although you might still want to check that and use some breakpoint unit root test in that case).

Also, even if you do everything right you might still get significant result even if we know that GDP should have unit root. This is statistics - the test is not some sort of truth checking machine it is all based on probability. For example, with p value 0.0186 even if your test has power 1 you would expect about 2 false positives out of 100 tests. Moreover, you definitely won’t have 1 power and with ADF test you usually need a lot of observations to get to 0.8 power which is considered good so the probability the result is not correct is even higher. You might want to try to run some alternative unit root test with null of stationarity and alternative of unit root (for example KPSS test). In any case when building some regressions I would always assume that GDP has a unit root due to overwhelming evidence from other studies and not just rely on the unit root test.

> **Comments:**
> **username_2**: Not controlling for serial correlation in error term will make a non-unit root series appear unit-root-like. The (suggested) issue here is the opposite one.  
> **username_1**: @Michael you are right, my bad I will correct that, although it’s still important to get lags right as overfitting lowers the power of the test although that’s probably not problem with only two lags  
> **username_2**: My guess is the plot of the de-trended series from the ADF regression would look like a stationary series. For an ADF t-stat to have p-value of 0.02 basically means running an AR(1) regression on the series gives a estimate far enough below 1. So at least if you eyeball the series it would appear borderline stationary. With trend this would be less visible as the linear trend dominates the stochastic trend. It would be interesting to know which country's GDP this is.  

---

