Português

Augmented Dickey-Fuller test (ADF)

Time series · reference distribution: τ (Dickey-Fuller)

When to use it

Check whether a time series has a unit root, that is, whether it is non-stationary.

Null hypothesis

The series has a unit root (it is not stationary).

Assumptions

Test statistic

\Delta y_t = \alpha + \gamma\, y_{t-1} + \sum_i \delta_i\, \Delta y_{t-i} + \varepsilon_t, \qquad \tau = \dfrac{\hat{\gamma}}{SE(\hat{\gamma})}

How to report it

ADF = −3.62, 4 lags, p = .034: rejects the unit root

In R and Python

R
library(tseries)
adf.test(series)
Python
from statsmodels.tsa.stattools import adfuller
adfuller(series)

In Python, stats is scipy.stats and np is numpy.

Variants and alternatives

Where it sits in the catalog

Time series. For observations ordered in time, where neighboring values tend to be correlated: they test stationarity and autocorrelation.

In the decision tree

  1. What do you want to do? Analyze a time series
  2. What do you want to know? Whether the series is stationary

Open the decision tree