9
$\begingroup$

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

$\endgroup$

1 Answer 1

11
$\begingroup$

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.

$\endgroup$
2
  • 1
    $\begingroup$ 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? $\endgroup$ Jul 22, 2022 at 13:26
  • 2
    $\begingroup$ @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. $\endgroup$ Jul 22, 2022 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.