ADF test fail to reject while kpss and box say white noise and stationary

Why would Augmented Dickey-Fuller Test fail to reject in this case? (Which implies a unit root exists and non-stationary series) when

Box-Ljung also fails to reject, which implies white noise? and,

KPSS test fails to reject, which implies stationary.

Data:

999300000
1020000000
1036547048
1034600000
1069910054
1047200000
990700000
1070000000
1161500000
1191100000
1219200000
1225400000
1336807261
1390300000
1373900000
1355700000
1503400000
1505600000
1503000000
1541800000
1689600000
1716400000
1640500000
1550800000
1627400000
1683100000
1666500000
1551700000
1631800000
1602100000
1670900000
1609200000
1723600000


After a seasonal and non-seasonal difference :

diff( diff ( data, lag = 4) )


Adf test won't reject null => unit root exists & non-stationary :

adf.test(diff(diff(data), lag=4))

Augmented Dickey-Fuller Test

data:  diff(diff(data), lag = 4)
Dickey-Fuller = -3.174, Lag order = 3, p-value = 0.1234
alternative hypothesis: stationary


Box test shows white noise though :

Box.test(diff(diff(data), lag=4),type='Ljung',lag=min(T, h))

Box-Ljung test

data:  diff(diff(data), lag = 4)
X-squared = 6.4625, df = 6.6, p-value = 0.4416


KPSS test doesn't reject showing stationary

kpss.test(diff(diff(data, lag=4)))

KPSS Test for Level Stationarity

data:  diff(diff(data, lag = 4))
KPSS Level = 0.080543, Truncation lag parameter = 2, p-value = 0.1


acf plot shows no significant autocorrellation

So why does Dickey-Fuller fail to reject?

A useful model for these 33 observations is here suggesting two time trends and 1 level/step shift along with a (1,0,0) arima structure. The model is here

With Actual/Fit and Forecast here and

Model residuals here and acf here suggesting model sufficiency .

The data is clearly non-stationary AND the remedy is NOT DIFFERENCING but detrending and incorporating a level shift (intercept change) . Both deterministic time trends and level/step shifts are the CAUSE of the non-stationarity.

Following is a presentation of the empirically identified " 3 causal series" ... ... two trends and 1 level/step shift , showing 33 periods of history and forecasts .

As others have reflected .. know thy assumptions and precisely what the null hypothesis and what the alternative hypothesis is for each test used.

• Thanks Irish. You made the series stationary by de-trending and a level shift, but why would ADF fail to reject if the series is trend-stationary? Shouldn't it reject if there is no unit root i.e. trend-stationary? Is the level shift to blame? I suspect if it is a level shift, maybe it makes the series look like a non-linear trend, and maybe adf is sensitive to non-linear trends? Please correct if I'm wrong! Jan 29, 2020 at 4:35
• I am not expert enough in the ADF test to answer this hypothetical . I suggest that you direct this question to www4.stat.ncsu.edu/~dickey and cite your data and cite my analysis. Jan 29, 2020 at 6:20

From looking at a graph of your time series, there is a clear upward trend present in the data, which suggests non-stationarity.

I decided to run some tests on the data you provided (Dickey-Fuller, Phillips-Perron, and KPSS), where the time series variable is given the name ts. Here are the results:

> library(lmtest)
> library(tseries)
> library(orcutt)
> #install.packages("egcm")
> library(egcm)
>

Augmented Dickey-Fuller Test

data:  ts
Dickey-Fuller = -0.4225, Lag order = 3, p-value = 0.9793
alternative hypothesis: stationary

>
> #Phillips-Perron Test
> pp.test(ts)

Phillips-Perron Unit Root Test

data:  ts
Dickey-Fuller Z(alpha) = -7.3396, Truncation lag parameter = 3, p-value = 0.6608
alternative hypothesis: stationary

>
> #KPSS Tests
> k1<-kpss.test(ts,null="Trend")
> k1

KPSS Test for Trend Stationarity

data:  ts
KPSS Trend = 0.17321, Truncation lag parameter = 3, p-value = 0.02733

> k1$$statistic KPSS Trend 0.1732075 > > k1$$method
[1] "KPSS Test for Trend Stationarity"


We can see that the null hypothesis for the Dickey-Fuller and Phillips-Perron tests cannot be rejected at the 5% level - implying non-stationarity as we expect.

However, in my case, the KPSS showed a p-value below 0.05, which means we reject the null hypothesis of stationarity - consistent with the results from the other two tests.

I note that you specified a lag of 4 time periods - you mention this is to account for non-seasonality. However, as this other answer explains, ADF and KPSS are designed for detecting nonstationarity from the presence of a unit root. However, these tests are not designed to detect other forms of nonstationarity, which includes seasonal nonstationarity.

In this regard, the tests conducted have indicated nonstationarity - which is evidenced by the fact that a clear trend is present in the data. In further modelling the data, you may wish to consider how stable the seasonal pattern is. If there are significant differences from one season to another, this can contribute to non-stationarity, while stable seasonal patterns represent more of a stationary pattern.

It might be an idea to decompose a portion of your time series, e.g. 1 year, to examine the seasonal patterns in more detail. It might be the case that the data is more representative of stationarity when analyzed over a shorter period of time.

• Thank you for your answer. I test ADF, it cannot be rejected, then, I difference seasonally and non-seasonally according to nsdiffs and ndiffs, and test ADF again. After these differences, ADF still shows a unit root, however, KPSS shows stationary, Box shows white noise series. and ACF shows no auto correlation. My question is referencing results after differencing has been performed. if BOX shows white noise, why would ADF still show non-stationary? Jan 27, 2020 at 18:09
• Ljung-Box is used to test for serial correlation across lags, it is not a test for stationarity: stats.stackexchange.com/questions/222765/… Jan 27, 2020 at 18:12
• I said it implies white noise, not that it is stationary. Am I wrong that no serial correlation accross lags implies white noise? Also, maybe I am wrong, but, isn't white noise always stationary? Jan 27, 2020 at 18:13
• White noise is a strictly stationary process, but that is not to say it is a wide-sense stationary process. You might find the following to be of clarification: stats.stackexchange.com/questions/335920/… Jan 27, 2020 at 18:17
• "no serial correlation accross lags implies white noise?" requires among other things that " no latent deterministic structure is present" . Jan 29, 2020 at 0:15