I am running an ADF test in R on the following series:

difference plot time series

This to me is clearly non-stationary, but when I run the ADF test:

adf.test(spreads[,y]- spreads[,x], alternative="stationary")

For whatever lag value I use I get a low p-value indicating a stationary series:

p-value smaller than printed p-value

I just can't understand why this is stationary or why the test indicates that it is. I have several examples like this in my data set too.

  • 2
    $\begingroup$ The test indicates that the series does not have a unit root. This is not the same as that the series is stationary. $\endgroup$ Oct 16 '18 at 13:41

On a first glance your data seems to be trend stationary. That means that if you subtract the trend (in this case a straight line with positive slope) from the time-series you will have a stationary time series. Trend stationary data is not stationary before you subtract the trend.

Also note the official RDocumentation:

The general regression equation which incorporates a constant and a linear trend >is used and the t-statistic for a first order autoregressive coefficient equals >one is computed. The number of lags used in the regression is k. The default >value of trunc((length(x)-1)^(1/3)) corresponds to the suggested upper bound on >the rate at which the number of lags, k, should be made to grow with the sample >size for the general ARMA(p,q) setup. Note that for k equals zero the standard >Dickey-Fuller test is computed. The p-values are interpolated from Table 4.2, p. >103 of Banerjee et al. (1993). If the computed statistic is outside the table of >critical values, then a warning message is generated.

Missing values are not allowed

There are some exceptions, e.g. missing values.

Furthermore here:

What is the difference between a stationary test and a unit root test?

and here:

Contradictory results of ADF and KPSS unit root tests

and here:

ADF test, PP test, KPSS test: Which test to prefer?

I already explained situations, in which the Nullhypothesis of an ADF-test is rejected and a time series is not-stationary. You should apply a KPSS test for stationarity as well.

Reject unit root, reject stationarity: both hypothesis are component hypothesis >– heteroskedasticity in series may make a big difference; if there is structural >break it will affect inference.

  • $\begingroup$ Thank you this really helped, sorry it has been asked so many times, I didn't really know what to look for however. My KPSS test has a p values < 0.01, I think as the null hypothesis is the opposite of the ADF test I can reject the null hypothesis of trend stationary right? I'm simply trying to find co-integration between two time series and the plot is the difference between the two which are definitely not co-integrated. $\endgroup$ Oct 16 '18 at 15:53
  • $\begingroup$ For Cointegration it is better to look for specialized cointegration tests, e.g. Johansen Test. $\endgroup$
    – Ferdi
    Oct 16 '18 at 15:56
  • $\begingroup$ Thanks @Ferdi will have a look! I tried the engle granger test but was running into problems with the apparent time series' being stationary which perhaps they were just trend stationary. Is there a reason why the Johansen Test is preferable? $\endgroup$ Oct 16 '18 at 16:02
  • $\begingroup$ I think both tests are suitable stats.stackexchange.com/questions/96789/… $\endgroup$
    – Ferdi
    Oct 16 '18 at 16:04
  • $\begingroup$ Just a small question about the Johansen test when only using two variables I’m a bit confused when I reject r0 but can’t reject r<=1 $\endgroup$ Oct 17 '18 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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