In R, using the package tseries, one uses the command adf.test for the Augmented Dickey-Fuller Test. However, this assumes a certain number of lags, unless specified.

I have a two-part question:

  1. How are the number of lags calculated? (Is this using the Akaike Information Criterion, for instance?)

  2. Is it ever possible for the (Augmented) Dickey-Fuller to support different hypotheses based on different lag lengths? e.g.: A time series modeled as an AR(1) may show up as non-stationary, but the same series modeled as an AR(12) is stationary.


1 Answer 1


From ?adf.test,

adf.test(x, alternative = c("stationary", "explosive"), k = trunc((length(x)-1)^(1/3)))

That is, a deterministic "rule-of-thumb" is the default for the lag length k. You could supply your own lag length based on the AIC, though, and that would be a valid idea (which is also implemented in other packages, I believe).

Question 2 can also be answered with a yes.

Try, e.g.,

y <- diffinv(rnorm(1000))   # contains a unit-root
adf.test(y, k=12)
adf.test(y, k=1)

This leads to disagreement at the 10% level.

The underlying reason is, like in any other regression, that adding/removing regressors (lagged differences in this case) that are correlated with some regressor of interest (the lagged level in this case) changes the coefficients and standard errors for that regressor, and hence the t-statistic, p-value and thus, possibly, the test decision.

Many papers in the unit root literature (e.g., Chang and Park, Econometric Reviews 2002 therefore provide results as to how to pick the number of lags in the ADF test regression.

  • $\begingroup$ Thanks, do you have any explanation for why this may be the case? Question 2, that is. $\endgroup$
    – Student
    Feb 14, 2020 at 16:43
  • 1
    $\begingroup$ @Student, I made an edit to hopefully clarify the issue. $\endgroup$ Feb 15, 2020 at 17:08
  • $\begingroup$ Okay, just the "usual" reasons then. Thanks! $\endgroup$
    – Student
    Feb 16, 2020 at 5:36

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.