In case you suspect your time series has a linear trend, what is the best way to prove it? If you just regress it against time, you ignore the auto correlation of the time series so I assume that is a bit foolish.

We learned to do unit root tests, and in those test you remove the auto correlation by including lags of the time series. So that problem is solved.

But I am struggling a bit with the unit root test which includes a trend ( ur.df(type="trend") in R ) , because the intercept is also included. But this intercept is like a drift, doesn't it remove the significance of the trend? Why don't we test for unit root with only the presence of a trend and not the intercept?

  • 2
    $\begingroup$ Strictly speaking, I don't think you can prove any such thing unless you know the data generating process. $\endgroup$
    – KOE
    Commented Feb 12, 2014 at 16:30
  • $\begingroup$ Ok so not strictly speaking :), but what test to find a trend has the highest power? $\endgroup$
    – Kasper
    Commented Feb 12, 2014 at 16:33
  • 1
    $\begingroup$ Can you modify your title / question accordingly? $\endgroup$
    – Glen_b
    Commented Feb 13, 2014 at 0:47

2 Answers 2


I can't answer which test of a linear trend has the highest power, but this may answer some of the other questions you have regarding the special case of the ADF test.

It's illustrative to consider the regular Dickey Fuller equation (let's disregard autocorrelation for now) for $\Delta y_t:=y_t - y_{t-1}$, viz. $$y_t - y_{t-1}=\alpha + \beta t + \gamma y_{t-1} +\varepsilon _t .$$ Note that this is equivalent to (just add $y_{t-1}$ to both sides):$$y_t =\alpha + \beta t + (\gamma + 1)y_{t-1} +\varepsilon _t .$$

From the second equation it is also clear that including the intercept does not automatically make the inclusion of $y_{t-1}$ or $t$ superfluous. The confusion arises here because you can algebraically find $\Delta y_t$ in two ways. For the DF-test, it's done this way; just subtract $y_{t-1}$ from the second equation to arrive at the first. In other words, $\alpha$ in the DF equation is not capturing the trending behavior, it's the same intercept as in the levels equation.

Suppose data is indeed generated according to this equation and that $\gamma = 0$ so we are looking at a process with both a deterministic and a stochastic trend. If you are only interested in whether the data is trending or not, disregarding the difference between stochastic and deterministic trend, you can more or less just plot the data and look for yourself, but this is not so interesting a finding.

If you want to convince anyone that your data is generated by a process including a linear time trend, you can run the ADF regression with $t$ included and show that the coefficient on $t$ is significantly (in statistical as well as general meaning) different from zero. You can not, however, just regress $y_t$ on $t$ and read of the coefficient on $t$ because you are not, loosely speaking, controlling for the unit root structure (no matter whether you have autocorrelation or not). The key is that when estimating with OLS the coefficients, again loosely speaking, measure the effects of their respective variables, after controlling for the other variables included in the regression.

If you know a priori that the process either includes a deterministic trend or a stochastic trend, but not both, then in order to distinguish them just look at the coefficients in the ADF regression. If your estimate of $\beta$ is significant that means there is a trend over time not explained by the unit root structure, if your estimate of $\gamma$ is not different from zero, then you conclude there is a unit root in the process and not a linear trend per your assumptions that it must be either or.

Note that this is all based on the ADF test. There are many other ways to examine the time series at hand. You should start by consulting a plot. In some cases it's relatively straight forward to see if the data is evolving around a time trend, or if its just wandering upwards or downwards due to the unit root. You could also rely on information criteria, like AIC and BIC to select the correct model as indicated in another answer here. A third possibility, especially attractive if you have a large sample, is to fit the competing models on on some chunk of observations and then predict future values. Eg., fit the two competing models on observations $\{s, s+1,\dots, s+t\}$ and then predict the value at time $s+t+1$. Then move forward through the sample one period at the time and form these one period ahead out of sample forecast. You can then decide which model forecasts best by using the Diebold & Mariano test and conclude that model to be the 'correct' one.

  • $\begingroup$ Thank you for your answer. Unfortunately I don't get it yet... Suppose the exercise asks you to find out if the data follows either a random walk with drift or either a linear trend. The data generation process is one of the two, not a combination. How would you proceed then? $\endgroup$
    – Kasper
    Commented Feb 13, 2014 at 20:50
  • $\begingroup$ Your comment is a bit confusing. A random walk with drift is exactly what I've written down. The drift is $\beta$ as you'll see if you first-difference the equation. Do you mean how to distinguish between a drift (which is the same as a linear time trend) and a stochastic trend in the form of a unit root? $\endgroup$
    – KOE
    Commented Feb 14, 2014 at 9:32
  • $\begingroup$ Hey, thx again for your time and answer. I have reread all the theory again. Are you sure a random walk with drift is the same as a trend stationary process? $\endgroup$
    – Kasper
    Commented Feb 14, 2014 at 11:29
  • $\begingroup$ I removed that last comment because it was poorly formulated on my part. The short answer is: I have not claimed that a random walk with a drift is a trend stationary process. $\endgroup$
    – KOE
    Commented Feb 14, 2014 at 11:42
  • $\begingroup$ Very confusing, isn't a random walk with drift given by this formula: Y_t= β +Y_(t−1) + ϵ_t (so without the t)? $\endgroup$
    – Kasper
    Commented Feb 14, 2014 at 11:44

No matter what we want to test, finally, we are going to fit an arima (p,d,q). That means, we only need to rely on the AIC/BIC to give an indication on whether the whole model is a good fit. Hence whether model needs differencing (d parameter) will be considered by the model choosing process. My opinion is that we don't need to test the linear trend specifically.

Rob J. Hyn­d­man answered similar question on detecting seasonality on Detecting Seasonality. It did give a method that may be useful.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.