# Unit root tests: how to decide if to include a trend and/or a constant

Applying a test to univariate time series data for checking if the series has a unit root or not, one is faced with a decision if one would like to test if the series is stationary around a constant or a trend. But I am not pretty sure, based on what sign should I infer which test is the reasonable one? Is it correct to look at the plot of the data and see if there is a trend visible, and if yes, then opt for a test of stationarity around a trend? And with the constant the same way: if there is no trend visible then see if the series might have a mean different from zero?

In general, if you decide what hypotheses to test by looking at the data you have to take the resulting p-values with a pinch of salt. The test for stationarity around a trend is the less specific (the slope can be as small as you like), so it's perhaps the better one if you're not prepared to assume beforehand that there's no trend. (And for some tests the null hypothesis is that there is a unit root; for others that there isn't, so you have another choice there.) Many people prefer just to examine the auto-correlation & partial auto-correlation functions for raw, de-trended, & differenced data.

As for the mean of a stationary series: you can certainly test whether it's significantly different from zero. But don't confuse lack of significance with positive evidence that it's exactly equal to zero & therefore remove it just for this reason.

• Hello Scortchi, so you suggest in case of doubt always to opt for a trend? And if I want to check if there is a dereministic trend, is it enough to look at the t-statistic of the trend coefficient in the estimated model? Nov 21, 2013 at 8:35
• (1) If I were performing, say, the KPSS test, I'd allow for trend under the null unless I was sure that there wasn't any, thus allowing me to interpret a high value of the test statistic as evidence for the presence of a unit root (given some other assumptions). (2) What model? If you're suspecting a unit root an OLS fit isn't much use, as a high t-statistic could indicate that as much as it could trend. Nov 21, 2013 at 18:23

Unit root test refers to ARIMA model while the trend, seasonal effect and random component approach is about decomposition approach. They are different approach of time series.

If ARIMA model is decided to use, unit root test can be employed and decide whether differencing is needed. But in this approach, seasonal component and trend should not be added to the model, because differencing can handle these effects.

On the other hand, in decomposition approach, unit root test is not appropriate, neither the differencing.

• You can have deterministic stochastic trend present together, e.g. $Y_t = \alpha + \beta t + Y_{t-1} + \epsilon_t$. In this case you need to difference and de-trend. So it makes sense to ask whether a series is stationary around a trend or not. Nov 21, 2013 at 18:26

You can check out this article which clearly specifies the test strategy one needs to follow in order to determine if your series has a trend or a constant. If you do not know whether the data contains a trend or not, then go to case 3 and assume it has a constant and a trend and carry an ADF test on the series. If the test fails to reject the null of 'its integrated', then the parameter in front of the trend line is 0. Then you regress change in your series against the constant plus lagged value of the original series. (the normal aDF test). Get the p value in front of the constant. If its greater than 5%, accept that your data has no trend or constant.

• I think the link might be broken, fyi Oct 6, 2016 at 1:07

I watch other way to find if your data has a trend or not. It shows that if the value of your acf is exponentially decreasing then it has a trend but if it flunctuates randomly from positive to neg vice versa then there is none .