3
$\begingroup$

I am using R and have found that both KPSS ( Kwiatkowski-Phillips-Schmidt-Shin ) and the adf (Dickey-Fuller) tests indicate stationarity, having a p-value of 0.01.

Here is a plot of the original data:

enter image description here

However, when I plot the correlogram, it looks as though the data are non-stationary.

enter image description here

So what do you think? Is the data stationary or non-stationary?

$\endgroup$
10
  • 2
    $\begingroup$ You have trend and seasonality. Neither should be surprising. Statistics would be different without tests, but judgment is needed too! $\endgroup$
    – Nick Cox
    Commented Feb 16, 2015 at 21:51
  • $\begingroup$ Thanks, so the answer is: non-stationarity. Yeah? I am pretty new to stats :) $\endgroup$
    – pookie
    Commented Feb 16, 2015 at 21:59
  • 4
    $\begingroup$ Naturally, the question still remains how strong the trend is and how much difference it makes. I am puzzled that you are in doubt about seasonality. The seasonality is evident from the graph and fits with what we know from everyday life. Learning statistics doesn't mean that we have to test whether day and night are statistically different, although there are problems where tests really are needed. By the way, don't take me for a time series expert. I'd suspect that you got those test results the wrong way round; I don't use those tests in my practice but that's my guess. $\endgroup$
    – Nick Cox
    Commented Feb 16, 2015 at 22:08
  • 1
    $\begingroup$ Stationary means the distribution does not change over time. So informally if you recorded all hits on the y-axis as counts in an interval and drew a histogram of those then if you repeated this exercise you should get the same if you shift your interval by a finite amount. Non-stationarity is for example a Wiener process (random walk) where you literally can't predict where it's going next. What you plotted looks stationary to me with a tiny trend and as remarked before seasonality. Your correlogram gives you informal evidence for autocorrelation, so try and fit 3 lags and a trend. $\endgroup$
    – Hirek
    Commented Feb 16, 2015 at 22:12
  • $\begingroup$ @Hirek "stationary ... with a tiny trend"; would you talk about "stationary with a large trend"? I think I know what you mean, but using terms in this way is really likely to confuse those new to the field. $\endgroup$
    – Nick Cox
    Commented Feb 16, 2015 at 22:17

3 Answers 3

8
$\begingroup$

Tests for stationarity are notorious for having weak power so keep that in mind. As mentioned in the comments, it helps to use judgement as well. A weakly stationary process by definition has a constant mean and variance.

While your correlogram (which I'm assuming is the autocorrelation function) shows significant autocorrelation, this does not necessarily mean the series is non-stationary - its telling us that the observations are not independent.

By just looking at your plot, the series does look stationary but highly seasonal.

Another diagnostic you can try, which is pretty much analogous to the ADF test, is to fit an AR(1) model to the data. If the AR(1) coefficient estimate is (significantly) less than 1, then we have evidence of a stationary process. If the AR(1) coefficient is approximately 1, the process is more likely to contain a unit-root and is non-stationary.

$\endgroup$
2
  • $\begingroup$ "the series does look stationary but highly seasonal" Aren't seasonal series considered non-stationary because the mean varies with time? $\endgroup$ Commented Nov 27, 2018 at 15:36
  • $\begingroup$ @infinitesimal you are correct. A series with seasonality cannot be stationary as we can use the seasonal pattern to inform our predictions based on the time. $\endgroup$
    – codeananda
    Commented Oct 22, 2021 at 3:31
3
$\begingroup$

I agree with all the points regarding seasonality and visual inspection above.

One additional thing: ADF tests the null of a unit root whereas KPSS tests the null of a stationary process. So if both have a p-value of .01, you actually have conflicting results (which may happen, tests being capable of type I and II errors, of course) at conventionel levels.

$\endgroup$
1
$\begingroup$

The declining wave pattern in the ACF and the ACF(1) > .9 indicates nonstationarity. If shown, the PACF would reveal a spike at PACF(1).

Transform the data to (1 - B), then examine the ACF and PACF. If a statistically significant spike occurs at PACF(12), then the series may be seasonally non-stationary, thus requiring the series to be transformed (1 - B) (1 - B)^12 prior to modeling the residuals.

Seasonal non-stationarity is a bit tricky to identify. The guiding rule is do NOT over difference in an attempt to achieve stationarity.

$\endgroup$

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.