9

I performed a augmented Dickey-Fuller test on a timeseries (that clearly has a trend) and, from the results, it suggests it is stationary (p-value = 0.01). Is this possible?

    Augmented Dickey-Fuller Test

data: timeseries_1 Dickey-Fuller = -5.7857, Lag order = 14, p-value = 0.01 alternative hypothesis: stationary

Timeseries

Richard Hardy
  • 67,272
FlipAD
  • 91

1 Answers1

11

From the help page:

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.

That is, adf.test() fits a regression using an intercept, a trend (!) and the first $k$ autoregressive terms in the series. Only in this context does it test whether the first autoregressive parameter is equal to one, which would indicate nonstationarity.

Thus, a trended series can definitely be stationary in the sense of tseries::adf.test(), namely if it is stationary after accounting for the trend.

Stephan Kolassa
  • 123,354
  • 1
    That plot almost looks like it's stationary around a nonlinear trend. Does asdf.test try multiple different trend models, or is the nonlinearity gentle enough that the ADF test routine doesn't trip on it? – shadowtalker Jul 22 '22 at 13:26
  • 2
    @shadowtalker: I looked at the source code, which is simple and straightforward R. It tries exactly one model as I described it here. The OP could in principle step through it with their original data. – Stephan Kolassa Jul 22 '22 at 13:28