6
$\begingroup$

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:

library(tseries)
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.

$\endgroup$
1
  • 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$ Commented Oct 16, 2018 at 13:41

1 Answer 1

3
$\begingroup$

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.

$\endgroup$
6
  • $\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$ Commented Oct 16, 2018 at 15:53
  • $\begingroup$ For Cointegration it is better to look for specialized cointegration tests, e.g. Johansen Test. $\endgroup$
    – Ferdi
    Commented Oct 16, 2018 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$ Commented Oct 16, 2018 at 16:02
  • $\begingroup$ I think both tests are suitable stats.stackexchange.com/questions/96789/… $\endgroup$
    – Ferdi
    Commented Oct 16, 2018 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$ Commented Oct 17, 2018 at 12:07

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.