# Stationarity Tests in R, checking mean, variance and covariance

This question was first asked on Stackoverflow, but as no one was able to answer, I wanted to ask it here.

The question is: is there a test for stationarity that is both able to identify stationary/non-stationary time-series in cases of increasing/decreasing/jumping mean and volatility measures?

In the question on Stackoverflow, I simulated six time-series, that look like this.

The first time-series is rightly classified as being stationary by all tests being used (Augmented-Dickey-Fuller Test (ADF), Box-Pierce/Ljung-Box Test (Box), Kwiatkowski-Phillips-Schmidt-Shin (KPSS), and the Phillips-Perron Test (PP)), however, especially the last 3 time-series are not rightly classified in many cases.

The results (p-values from the tests using r (copied from the other question, where you also find the r-code to recreate the same time-series)) look like this:

# p-values for different tests (note that the tests have different H_0's)
#      adf.test    Box.test kpss.test   PP.test  # stat:non_stat
# ts1 0.0100000 0.386053779      0.10 0.0100000  # 4:0 clearly stat
# ts2 0.4195604 0.000000000      0.01 0.3260713  # 0:4 clearly non-stat
# ts3 0.5467517 0.000000000      0.01 0.0100000  # 1:3 most-likely non-stat
# ts4 0.0100000 0.004360365      0.10 0.0100000  # 2:2 ?!
# ts5 0.0100000 0.033007310      0.10 0.0100000  # 2:2 ?!
# ts6 0.0100000 0.307453035      0.10 0.0100000  # 4:0 stationary ?!


Are you aware of any tests that are able to distinguish between stationary/non-stationary time-series under the different circumstances?

Any help/solution/idea is greatly appreciated!

• The last three series are generated how? It might be that they are GARCH type processes, so they are stationary. Commented Nov 20, 2015 at 16:16
• If you look at the question on stackoverflow (stackoverflow.com/questions/33522442/…), you'll see that they are not GARCH, but are random draws from normal distributions with changing (jumping, increasing and quadratic) standard-deviations. Commented Nov 20, 2015 at 16:19
• All of these tests do not test for non-stationarity in variance. So your results are kind of expected. Commented Nov 20, 2015 at 16:22
• Thats a valuable comment, thanks for it! Nonetheless, are you aware of tests that look at the variance? Commented Nov 20, 2015 at 17:51