Unit Root Test for Stationarity: DF, ADF & PP Detailed Guide with Example

Why Stationarity Matters

A time series Y_t is (weakly, or covariance) stationary if its statistical properties do not change over time. Formally, three conditions hold for every t:

  • E(Y_t)=\mu — constant mean
  • Var(Y_t)=\sigma^2 — constant variance
  • Cov(Y_t,Y_{t+k})=\gamma_k — depends only on the lag k, never on t

These conditions matter because time-series inference is only valid when these properties hold. Regressing one non-stationary series on another produces a high R^2 and significant t-statistics even though no real relationship exists between them:

If a series produces a high R^2 but a low Durbin-Watson statistic (i.e., positive autocorrelation), this is the case of the spurious or nonsense regression problem (Granger and Newbold, 1974). Therefore, it is necessary to check the stationarity of the time series and correct it before a time-series regression is estimated

Two broad approaches are used to check whether a series is stationary: an informal graphical method and a set of formal unit root tests. This article works through both.

Graphical Method: The Line Plot

Definition

The first and simplest check is to plot the series against time and inspect it visually. A time-series (line) plot places Y_t on the vertical axis against t on the horizontal axis, in the order the observations occurred.

Procedure

There is no formula to derive here; the check is visual, not statistical. Three features are examined:

  • Level — Does the series drift upward or downward over the sample, or does it hover around one constant value?
  • Spread — Does the size of the fluctuations around the average grow or shrink over time, or stay roughly constant?
  • Shocks — Does the series return to its earlier level after a disturbance, or does the disturbance shift it permanently?

Decision rule

Because this is a visual check, there is no statistical criterion. But generally we can conclude:

  • Non-stationary — a trending mean, a widening/narrowing band of fluctuation, or a level permanently shifted by past shocks.
  • Stationary — a roughly constant mean and spread, with the series pulled back toward that mean after a shock.

Interpretation

A plot is only ever suggestive — two series can look similar to the eye while only one has a unit root, especially in short samples. The graphical method is used to form a first impression and to decide, for instance, whether to test a series in levels, in first differences, or with a trend included. The formal decision is left to a unit root test.

Unit Root Tests: The Common Framework

DF, ADF, and PP all start from the same idea. Consider a first-order autoregressive process:

Y_t=\rho Y_{t-1}+u_t

  • If \rho=1, the process is a random walk, Y_t=Y_{t-1}+u_t: every shock u_t is carried forward permanently, the variance of Y_t grows with t, and the series has a unit root.
  • If |\rho|<1, past shocks decay and the series reverts to a constant mean — it is stationary.

Subtracting Y_{t-1} from both sides gives the form actually estimated:

Y_t-Y_{t-1}=(\rho-1)Y_{t-1}+u_t

\Delta Y_t=\delta Y_{t-1}+u_t, where \delta\equiv\rho-1

Testing \rho=1 is therefore identical to testing \delta=0, which is why the tests below are written in terms of \delta. The regression may include a constant (drift) and/or a linear trend, giving three commonly estimated forms:

  • No constant, no trend: \Delta Y_t=\delta Y_{t-1}+u_t
  • With constant: \Delta Y_t=\alpha+\delta Y_{t-1}+u_t
  • With constant and trend: \Delta Y_t=\alpha+\beta t+\delta Y_{t-1}+u_t

Common hypotheses

H₀: \delta=0 (equivalently \rho=1) — the series has a unit root; it is non-stationary

H₁: \delta<0 (equivalently \rho<1) — the series has no unit root; it is stationary

This is a one-sided (left-tailed) test: \rho>1 implies an explosive series, a case rarely entertained in economic data, so the alternative is \delta<0 rather than \delta\neq0.

Why not use ordinary t-critical values?

Under H_0, Y_{t-1} is itself non-stationary, so the usual normal-based asymptotic theory behind the t-distribution breaks down.

Dickey and Fuller (1979) derived the correct, non-standard limiting distribution and tabulated critical values for it; MacKinnon (1996) later supplied response-surface formulas so critical values and p-values could be computed for any sample size.

This is why software reports “Dickey-Fuller” or “MacKinnon” critical values and p-values here, rather than ordinary t or normal ones.

DF, ADF, and PP differ mainly in how they treat the error term u_t — not in this basic logic.

Dickey-Fuller (DF) Test

Definition

The Dickey-Fuller (Dickey and Fuller, 1979) test formally detects the presence of a unit root in a time series. It is based on an AR(1) model and assumes that the error term is white noise. If the null hypothesis of a unit root is not rejected, the series is considered non-stationary.

Derivation

Starting from Y_t=\rho Y_{t-1}+u_t and reparameterising as shown in Section 3 gives the estimating equation (fitted with or without \alpha, \beta t, per the three forms above):

\Delta Y_t=\alpha+\beta t+\delta Y_{t-1}+u_t

Hypotheses

H₀: \delta=0 — unit root present; Y_t is non-stationary

H₁: \delta<0 — no unit root; Y_t is stationary

Test statistic

\tau_{calc}=\frac{\hat\delta}{SE(\hat\delta)}

This has the form of an ordinary t-ratio, but under H_0 it follows the non-standard Dickey-Fuller distribution, not the t-distribution. Critical values come from Dickey-Fuller/MacKinnon tables and are more negative than the corresponding t/normal critical values at the same significance level.

Decision rule

t-Statistic Method

ComparisonDecision
\tau_{calc} < \tau_{critical}Reject H_0 → Series is stationary
\tau_{calc} > \tau_{critical}Fail to reject H_0 → Series is non-stationary

P-Value Method

p-value methodDecision
p-value <\alpha (e.g. 0.05)Reject H₀ → series is stationary
p-value \geq\alphaFail to reject H₀ → series is non-stationary

Interpretation

Rejecting H_0 means the series has no unit root at the level tested and can be treated as stationary there. Failing to reject means the series still contains a unit root and should be re-tested after differencing (or with a trend/constant added, as appropriate) until stationarity is achieved.

Limitation

The DF test’s validity rests on u_t being white noise. Economic and financial series are usually autocorrelated, which biases DF toward over-rejecting H_0 if left uncorrected — this motivates the ADF test.

Augmented Dickey-Fuller (ADF) Test

Definition

The Augmented Dickey-Fuller (Dickey and Fuller, 1981; Said and Dickey, 1984) test is the modified version of the Dickey-Fuller unit root test used to test the stationarity of a variable. It overcomes the problem of autocorrelation by including the lagged difference of the dependent variable.

Derivation

Starting from the DF equation and adding p lagged difference terms of the dependent variable:

\Delta Y_t=\alpha+\beta t+\delta Y_{t-1}+\sum_{i=1}^{p}\phi_i\Delta Y_{t-i}+\varepsilon_t

The lag length p is chosen so that \varepsilon_t is free of serial correlation — commonly by minimising an information criterion (AIC, SBC/BIC, or Hannan-Quinn) across candidate lag lengths.

Another method is to start from a maximum lag, such as Schwert’s rule of thumb, p_{max}=\lfloor 12(T/100)^{0.25}\rfloor, and drop insignificant higher-order lags.

Hypotheses

H₀: \delta=0 — unit root present; series is non-stationary

H₁: \delta<0 — no unit root; series is stationary

Test statistic

Same form as DF, \tau_{calc}=\hat\delta/SE(\hat\delta), now computed from the augmented regression. It is compared against the same Dickey-Fuller/MacKinnon critical values, since the two statistics share the same limiting distribution asymptotically.

Decision rule

t-Statistic Method

t-statistic (τ) methodDecision
\tau_{calc}<\tau_{critical}Reject

H0H_0→ Series is stationary

\tau_{calc}>\tau_{critical}Fail to reject

H0H_0→ Series is non-stationary

P-Value Method

p-value methodDecision
p-value <\alphaReject H₀ → series is stationary
p-value \geq\alphaFail to reject H₀ → series is non-stationary

Interpretation

Read exactly as DF, but the conclusion is now robust to the autocorrelation that the p lagged-difference terms have absorbed; this is the practical reason ADF is the default choice in applied work.

Phillips-Perron (PP) Test

Definition

The Phillips-Perron test (Phillips and Perron, 1988) tests the same null hypothesis as DF/ADF but, instead of augmenting the regression with lagged differences, corrects the DF test statistic itself for serial correlation and heteroskedasticity in u_t using a non-parametric estimate of its long-run variance. It does not require choosing a regression lag length.

Derivation

PP starts from the same regression as DF, conventionally written in level form (algebraically equivalent to Section 3’s difference form, with \delta=\rho-1):

Y_t=\alpha+\rho Y_{t-1}+u_t

t_\rho=\frac{\hat\rho-1}{SE(\hat\rho)}

Because u_t may be autocorrelated and heteroskedastic, PP estimates its long-run variance non-parametrically, following Newey and West (1987). With \hat u_t the OLS residuals, T the sample size, and q a truncation lag:

\hat\gamma_0=T^{-1}\sum_{t=1}^{T}\hat u_t^2

\hat\gamma_j=T^{-1}\sum_{t=j+1}^{T}\hat u_t\hat u_{t-j}

\hat\lambda^2=\hat\gamma_0+2\sum_{j=1}^{q}\left(1-\frac{j}{q+1}\right)\hat\gamma_j

\hat\gamma_0 is the usual short-run residual variance; \hat\lambda^2 is the long-run variance once serial correlation is accounted for (q is chosen much as ADF’s lag length is, e.g. q=\lfloor4(T/100)^{0.25}\rfloor — but only to build this variance estimate, since the regression itself stays unaugmented). The corrected statistic is:

Z_t=\left(\frac{\hat\gamma_0}{\hat\lambda^2}\right)^{1/2}t_\rho-\frac{T(\hat\lambda^2-\hat\gamma_0)}{2\hat\lambda\cdot SE(\hat\rho)}

When there is no autocorrelation, \hat\lambda^2=\hat\gamma_0 and Z_t collapses back to the ordinary DF statistic.

Hypotheses

H₀: \rho=1 (equivalently \delta=0) — unit root present; series is non-stationary

H₁: \rho<1 (equivalently \delta<0) — no unit root; series is stationary

Decision rule

t-Statistic Method

ComparisonDecision
Z_t < Z_{critical}Reject H_0 → Evidence against unit root → Series is stationary
Z_t > Z_{critical}Fail to reject H_0 → Evidence of unit root → Series is non-stationary

P-Value Method

p-value methodDecision
p-value <\alphaReject H₀ → series is stationary
p-value \geq\alphaFail to reject H₀ → series is non-stationary

Z_t is compared against the same Dickey-Fuller/MacKinnon critical values used for DF and ADF, since it shares their asymptotic distribution.

Interpretation

Read exactly as DF/ADF.

Worked Example: Interpreting ADF Results

The two illustrations below are drawn from applied ADF output for macroeconomic series.

p-value method

H₀: series has a unit root (non-stationary)
H₁: series has no unit root (stationary)
Rule: if p-value <0.05, reject H₀ → stationary; if p-value >0.05, fail to reject H₀ → non-stationary.

VariableLevel — InterceptLevel — Intercept & Trend1st Diff. — Intercept1st Diff. — Intercept & TrendConclusion
LCPI (log CPI)0.8690.0930.0150.088I(1)
LM2 (log money supply)0.8010.1650.0000.000I(1)
LY (log GDP)0.0600.9430.0010.000I(1)
LGEXP (log govt. expenditure)0.8760.4260.0000.000I(1)

Interpreting LCPI

At level: p-values are 0.869 (intercept) and 0.093 (intercept & trend), both >0.05 → fail to reject H₀ → LCPI is non-stationary at level.

At first difference: p-values fall to 0.015 and 0.088. The intercept-only p-value (0.015) is below 0.05, so H₀ is rejected at the 5% level; the intercept-and-trend p-value (0.088) clears the 10% threshold rather than 5%. Either way, H₀ is rejected once significance is judged at the level the p-value actually clears.

Conclusion: LCPI is non-stationary in levels but becomes stationary after first differencing — it is integrated of order one, I(1). The same pattern holds for LM2, LY, and LGEXP above, so all four series are I(1).

t-statistic method

Critical value at the 5% level of significance: -3.527.

H₀: series has a unit root (non-stationary)
H₁: series has no unit root (stationary)
Rule: if ADF t-stat <-3.527 (more negative), reject H₀ → stationary; if ADF t-stat >-3.527, fail to reject H₀ → non-stationary. Equivalently, by p-value: reject H₀ if p-value <0.05.

Variablet-stat, Levelp-value, Levelt-stat, 1st Diff.p-value, 1st Diff.Order of Integration
Inflation0.7700.9917−3.6240.0245I(1)
GDP−3.7430.0077−7.3310.0000I(0)

Interpreting GDP

At level: t-statistic =-3.743, critical value at 5% =-3.527. Since -3.743 is more negative than -3.527, H₀ is rejected. The p-value confirms this: 0.0077<0.05.

Conclusion: GDP is already stationary at level — no differencing is required, so it is integrated of order zero, I(0). Both decision routes (t-statistic and p-value) agree, as they always will since they are two views of the same test.

Interpreting Inflation (contrast case)

At level: t-statistic =0.770 — not more negative than -3.527 — so H₀ is not rejected; the p-value, 0.9917, confirms this decisively. Inflation is non-stationary at level.

At first difference: t-statistic =-3.624, more negative than -3.527 → reject H₀; p-value =0.0245<0.05 agrees.

Conclusion: Inflation is integrated of order one, I(1) — the more common outcome for macroeconomic series, which is what makes GDP’s stationarity at level (above) the noteworthy exception in this dataset.

Summary Comparison

MethodTypeHow it handles autocorrelation in errorsNeeds a lag length choice?Hypotheses & critical values
Line plotGraphical, informalNot applicable — visual inspection onlyNoNo formal test
DFFormal, parametricAssumes none (white-noise errors)NoBaseline: Dickey-Fuller / MacKinnon
ADFFormal, parametricAdds lagged \Delta Y terms to whiten the errorsYes (p)Same H_0/H_1; same critical values as DF (asymptotically)
PPFormal, non-parametricCorrects the DF statistic via a Newey-West long-run varianceOnly a truncation lag (q) for the variance estimateSame H_0/H_1; same critical values as DF/ADF

In practice: start with a line plot to form a first impression, then confirm with one or more unit root tests. If ADF and PP disagree, it usually signals that the error structure needs more care.

References

Dickey, D. A., & Fuller, W. A. (1979). Distribution of the Estimators for Autoregressive Time Series with a Unit Root. Journal of the American Statistical Association, 74(366), 427–431.

Dickey, D. A., & Fuller, W. A. (1981). Likelihood Ratio Statistics for Autoregressive Time Series with a Unit Root. Econometrica, 49(4), 1057–1072.

Phillips, P. C. B., & Perron, P. (1988). Testing for a Unit Root in Time Series Regression. Biometrika, 75(2), 335–346.

Newey, W. K., & West, K. D. (1987). A Simple, Positive Semi-Definite, Heteroskedasticity and Autocorrelation Consistent Covariance Matrix. Econometrica, 55(3), 703–708.

MacKinnon, J. G. (1996). Numerical Distribution Functions for Unit Root and Cointegration Tests. Journal of Applied Econometrics, 11(6), 601–618.

Granger, C. W. J., & Newbold, P. (1974). Spurious Regressions in Econometrics. Journal of Econometrics, 2(2), 111–120.

End of Article

Share this article

About the author

Picture of Muhammad Minhaj Akhtar

Muhammad Minhaj Akhtar

Muhammad Minhaj Akhtar is a Lecturer in Economics at Government Graduate College Jauharabad, Pakistan. He holds an M.Phil. in Economics from Quaid-i-Azam University, Islamabad, and an MSc in Economics from the University of Sargodha, where he earned a Silver Medal. His academic passion lies in Econometrics, with a strong focus on applying empirical methods to real-world economic issues. Through MinhajMetrixHub, he shares learning resources, research guidance, and practical econometric insights for students and researchers.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts