[R] Augmented Dickey Fuller test

Achim Zeileis Achim.Zeileis at uibk.ac.at
Fri Apr 28 14:01:46 CEST 2017

On Fri, 28 Apr 2017, T.Riedle wrote:

> Dear all,
> I am trying to run an ADF test using the adf.test() function in the 
> tseries package and the ur.df() function in the urca package. The 
> results I get contrast sharply. Whilst the adf.test() indicates 
> stationarity which is in line with the corresponding graph, the ur.df() 
> indicates non-stationarity.
> Why does this happen?

This is likely due to different setting for the deterministic part of the 
model and/or the number of lags tested. The defaults of ur.df() are often 
not suitable for many practical applications which might to spurious 
significant results.

> Could anybody explain the adf.test() function in more detail? How does 
> adf.test() select the number of lags is it AIC or BIC and how does it 
> take an intercept and/or a trend into account?

There is a deterministic trend and the default number of lags is selected 
by a heuristic.



I've summarized an overview that I had written for my students. It might 
also be helpful for you.


More information about the R-help mailing list