Building a Case

Module 2 · Stationarity as a Verdict, Not a Measurement

Gary Cornwall

Econ 6376 · The George Washington University

Prologue · The case reopens

Where we left off

Last module ended on a cliffhanger: two independent random walks handed us a beautiful R2R^2 and a fake-significant slope.

  • |ϕ|<1|\phi| < 1: stationary, variance well-behaved.
  • ϕ=1\phi = 1: random walk, variance grows without bound — spurious regression with anything.
  • ϕ=0.95\phi = 0.95 vs. ϕ=1.0\phi = 1.0: nearly indistinguishable in small samples.

Today’s question: given a series, which side of the boundary are we on?

Where we are on the mixing board

Module 2 turns on no new sliders. The master equation is the one from Module 1:

yt=α+δt+∑j=1pϕjyt−j+∑l=1qθlϵt−l+ϵt.y_t = \alpha + \delta t + \sum_{j=1}^{p} \phi_j y_{t-j} + \sum_{l=1}^{q} \theta_l \epsilon_{t-l} + \epsilon_t.

The DGP is still the AR(1) — α\alpha and ϕ1\phi_1 are the only active channels. What changes is the question we ask of it: is ϕ1=1\phi_1 = 1?

One slider does make its first cameo: the deterministic trend δt\delta t. Deciding whether a trending series is trend-stationary or difference-stationary turns out to be part of the same testing problem — Act IV.

Stationarity is a verdict, not a measurement

Students want a one-test, one-number, one-answer protocol. Real data does not cooperate.

  • No single piece of evidence is conclusive.
  • We build a case from multiple sources — visual, ACF, formal tests, rules of thumb.
  • When the evidence agrees, the answer is clear. When it conflicts, we lean on the cost asymmetry.

Sidney Paget, 1904. Deduction from evidence — under uncertainty.

The tool that does double duty: Δ\Delta

Δyt=yt−yt−1=(1−L)yt,Δ2yt=(1−L)2yt=yt−2yt−1+yt−2\Delta y_t = y_t - y_{t-1} = (1-L)\,y_t, \qquad \Delta^2 y_t = (1-L)^2 y_t = y_t - 2y_{t-1} + y_{t-2}

  • First difference = rate of change; second difference = acceleration. For economic series you rarely go past Δ2\Delta^2.
  • Δ\Delta is both the dependent variable in the Dickey–Fuller regression and the fix for a non-stationary series.

Act I · The armchair

“You see, but you do not observe.” Act I — visual inspection

What the eye can and can’t do

Three questions to ask any series you’re handed:

  1. Does it wander without returning to a level? (possible non-stationarity)
  2. Does the variance look like it changes over time? (variance violation)
  3. Is there an obvious trend? (then: trend-stationary or difference-stationary?)

Bottom line. Visual inspection is the cheapest test we have — and the most easily misled. It is a starting point, not a verdict.

What stationarity looks like

Sub-period means (bars) and ±2σ bands (shaded). Read them for the two things stationarity requires: a constant level and a constant spread.

Top: means level off, bands equal width — stationary. Middle: means wander, bands widen — random walk. Bottom: the series trends, but the deviations from the line are well-behaved — trend-stationary, the classic trap.

Act II · The forensic lab

“The evidence doesn’t lie — but you have to read it right.” Act II — the ACF and the formal tests

Exhibit A: the correlogram

You never see the true ρk=ϕk\rho_k = \phi^k — only a noisy sample estimate. Crank TT up and it converges; shrink TT and push ϕ→1\phi\to 1 and it goes blind.

The instrument’s blind spot

Flip the bench above to Blind quiz: you get one series and must call it — unit root or just persistent? At ϕ=0.95,T=80\phi = 0.95,\ T = 80 your hit rate hovers near a coin flip. That blindness is why one witness is never enough — and it’s exactly where Act III begins.

What we’re testing

Start from the AR(1): yt=α+ϕyt−1+ϵt.\;y_t = \alpha + \phi\,y_{t-1} + \epsilon_t.

  • H0:ϕ=1H_0: \phi = 1 (unit root, non-stationary)  vs.  H1:ϕ<1H_1: \phi < 1 (stationary). One-sided.
  • First instinct that fails: OLS tt-stat on ϕ̂\hat\phi. Under H0H_0, yt−1y_{t-1} is a random walk — standard asymptotics break, and the statistic is not tt-distributed.

Building the DF regression

Subtract yt−1y_{t-1} from both sides and let γ=ϕ−1\gamma = \phi - 1:

Δyt=α+γyt−1+ϵt,H0:γ=0(ϕ=1),H1:γ<0.\Delta y_t = \alpha + \gamma\,y_{t-1} + \epsilon_t, \qquad H_0: \gamma = 0 \;\;(\phi=1), \quad H_1: \gamma < 0.

  • Under H0H_0 the LHS Δyt=ϵt\Delta y_t = \epsilon_t is stationary — the regression is at least well-behaved on the left.
  • γ=0\gamma = 0 tests exactly the unit root. The ADF adds ∑i=1pβiΔyt−i\sum_{i=1}^p \beta_i \Delta y_{t-i} to soak up serial correlation.

Three specifications — pick to match the plot

none: Δyt=γyt−1+…drift: Δyt=α+γyt−1+…trend: Δyt=α+δt+γyt−1+…\text{none: } \Delta y_t = \gamma y_{t-1} + \dots \quad \text{drift: } \Delta y_t = \alpha + \gamma y_{t-1} + \dots \quad \text{trend: } \Delta y_t = \alpha + \delta t + \gamma y_{t-1} + \dots

Critical values differ across specifications — and adding deterministic terms reduces power. There is no free lunch. (See the widget on the next slide: watch the null distribution slide left as you add terms.)

Why a different null distribution? Watch it build.

The DF τ\tau looks like a tt-statistic, but its regressor is a random walk. We don’t derive the limit — we simulate it and read the 5% cutoff straight off the pile.

MacKinnon critical values

CV0.05(T)=−2.86154−2.8903T−4.234T2−40.04T3(drift).\text{CV}_{0.05}(T) = -2.86154 - \frac{2.8903}{T} - \frac{4.234}{T^2} - \frac{40.04}{T^3} \quad(\text{drift}).

MacKinnon (1996) fit response-surface formulas to exactly the quantiles you just watched form — so you don’t re-simulate every time. Critical values depend on TT; as T→∞T\to\infty, the drift 5% cutoff →−2.86\to -2.86.

The function we keep using

MacKinnon’s values aren’t magic — they’re the empirical quantiles of the pile you just watched form. One function, reused all semester:

mackinnon_cv <- function(T, level = 0.05, spec = "drift") {
  if (spec == "drift" && level == 0.05)
    return(-2.86154 - 2.8903/T - 4.234/T^2 - 40.04/T^3)
  if (spec == "drift" && level == 0.01)
    return(-3.43035 - 6.5393/T - 16.786/T^2 - 79.433/T^3)
  if (spec == "drift" && level == 0.10)
    return(-2.56677 - 1.5384/T - 2.809/T^2)
  stop("Specification not implemented.")
}

At T=200T = 200 this returns −2.876-2.876; our Monte-Carlo 5% quantile was ≈−2.87\approx -2.87. Same number, one from a formula, one from the pile.

ADF from scratch

Strip the mystery: the ADF is one regression and one tt-ratio. On a stationary AR(1) (ϕ=0.7\phi = 0.7, T=200T = 200):

set.seed(8675309)
y <- arima.sim(n = 200, list(ar = 0.7))     # stationary
dy      <- diff(y)
X       <- embed(dy, 5)                       # [Δy_t, Δy_{t-1}, …, Δy_{t-4}]
adf_reg <- lm(X[, 1] ~ y[5:(length(y)-1)] + X[, -1])   # Δy on y_{t-1} + 4 lags
adf_stat <- summary(adf_reg)$coefficients[2, "t value"]  # t-ratio on y_{t-1}
Quantity Value
ADF τ\tau-statistic −4.92-4.92
5% MacKinnon CV (T=200T=200) −2.88-2.88
Reject the unit root? Yes (−4.92<−2.88-4.92 < -2.88)

The packaged version

Every semester after: let the package do it. Same series, same answer.

library(urca)
adf_pkg <- ur.df(y, type = "drift", lags = 4)
summary(adf_pkg)          # reads off τμ and the critical values
Statistic Value 1% 5% 10%
τμ\tau_\mu (on γ̂\hat\gamma) −4.92-4.92 −3.46-3.46 −2.88-2.88 −2.57-2.57

Identical to the by-hand τ\tau, to the decimal — same regression, same tt-ratio. Doing it once by hand demystifies the package — then we use the package.

Lag selection

How many lagged differences pp? A bias–variance trade:

  • Too few → residual serial correlation leaks into the test and biases it.
  • Too many → wasted degrees of freedom, lower power.
  • ur.df(..., selectlags = "BIC") — our default for problem sets.
  • AIC selects more lags than BIC — know that going in.
  • Schwert’s rule: start at pmax=⌊12(T/100)1/4⌋p_{\max} = \lfloor 12\,(T/100)^{1/4} \rfloor and trim insignificant top lags.

KPSS: the reverse null

Test H0H_0 H1H_1
ADF unit root stationary
KPSS stationary unit root

Opposite nulls → confirmatory analysis. Both have low power against close alternatives, so together they triangulate. When both fail to reject, the data genuinely cannot discriminate — an honest “I don’t know.”

KPSS in R

library(urca)
kpss_result <- ur.kpss(y, type = "mu")   # "mu" = level, "tau" = trend
summary(kpss_result)
Statistic Value 10% 5% 1%
KPSS ημ\eta_\mu 0.0800.080 0.3470.347 0.4630.463 0.7390.739

0.080<0.4630.080 < 0.463 → fail to reject stationarity, agreeing with the ADF. Watch the polarity: ADF rejects for stationarity at large negative values; KPSS rejects against it at large positive ones. This flips students up every semester.

The confirmatory grid — a reference card

The four outcomes, in one table (the live version is the Act III widget):

ADF (H0H_0: unit root) KPSS (H0H_0: stationary) Verdict
Reject Fail to reject Stationary
Fail to reject Reject Unit root
Reject Reject Conflict — break / borderline
Fail to reject Fail to reject Honest “I don’t know”

The last row is the one that matters: two tests of opposite nulls both failing means the data will not discriminate — usually a borderline ϕ\phi or too small a sample.

Other tests — brief mentions

  • Phillips–Perron (PP). Same null as ADF, but a non-parametric correction for serial correlation instead of lagged differences. urca::ur.pp().
  • Elliott–Rothenberg–Stock (ERS / DF-GLS). A more powerful ADF using GLS detrending — best exactly where standard ADF loses power (non-zero mean or trend). urca::ur.ers(). If you remember one alternative, remember this one.

None of them solves the fundamental power problem. Different tools, same job — which is why we still build a case.

Act III · Differential diagnosis

“Everybody lies — including your test statistic.” Act III — low power & the borderline case

The single most important practical fact

Unit-root tests have low power against highly persistent stationary alternatives. At ϕ=0.95\phi = 0.95 in a short sample, the ADF often fails to reject even though the series is stationary.

  • The borderline cases are exactly where testing is most useful and most fragile.
  • The cure is not a better test — it’s the build-a-case framework plus the cost asymmetry.

Two tests, opposite nulls — watch them disagree

ADF (H0H_0: unit root) and KPSS (H0H_0: stationary) together give confirmatory analysis. Crank ϕ\phi toward 1, then Run 200: a truly stationary series lands on the right verdict only a fraction of the time. The scatter is the low power.

Act IV · The courtroom

“Beyond a reasonable doubt.” Act IV — the verdict and the cost of being wrong

A rule of thumb

From Dr. Jeff Mills: compare the spread of the differences to the spread of the levels, σΔyσy{<0.5difference≥0.5keep levels\frac{\sigma_{\Delta y}}{\sigma_y} \;\begin{cases} < 0.5 & \text{difference} \\ \ge 0.5 & \text{keep levels} \end{cases}

For a stationary AR(1), σΔyσy=2(1−ϕ)\dfrac{\sigma_{\Delta y}}{\sigma_y} = \sqrt{2(1-\phi)}: it’s 2\sqrt{2} at white noise and →0\to 0 as ϕ→1\phi\to 1. The <0.5<0.5 cutoff flags ϕ≳0.875\phi \gtrsim 0.875. Fast, informal — a sanity check, not a test.

Dr. Jeff Mills — pretty cool guy.

Why the ratio works

For a stationary AR(1), Var(yt)=σϵ21−ϕ2,Var(Δyt)=2σϵ21+ϕ.\operatorname{Var}(y_t) = \frac{\sigma_\epsilon^2}{1-\phi^2}, \quad \operatorname{Var}(\Delta y_t) = \frac{2\sigma_\epsilon^2}{1+\phi}.

Their ratio collapses to σΔyσy=2(1−ϕ).\frac{\sigma_{\Delta y}}{\sigma_y} = \sqrt{2(1-\phi)}.

2\sqrt2 at white noise, →0\to 0 as ϕ→1\phi\to1. If differencing shrinks the spread a lot, the levels were accumulating shocks.

Order of integration & the over-differencing tax

I(d)I(d) = number of differences to reach stationarity. I(0)I(0) already stationary; I(1)I(1) most common in economics; I(2)I(2) rare. Over-difference a trend-stationary series and you introduce a non-invertible MA(1) (θ=−1\theta = -1) — the tell-tale −0.5-0.5 spike at lag 1.

How many licks to the center? For economic series, almost never more than two.

The over-differencing tax, in algebra

Say the truth is trend-stationary: yt=α+δt+uty_t = \alpha + \delta t + u_t with utu_t stationary. The correct move is to detrend. Difference instead:

Δyt=(α+δt+ut)−(α+δ(t−1)+ut−1)=δ+(ut−ut−1)⏟Δut.\Delta y_t = \big(\alpha+\delta t+u_t\big) - \big(\alpha+\delta(t-1)+u_{t-1}\big) = \delta + \underbrace{(u_t - u_{t-1})}_{\Delta u_t}.

  • If utu_t is white noise, Δut=ϵt−ϵt−1\Delta u_t = \epsilon_t - \epsilon_{t-1} is an MA(1) with θ=−1\theta = -1: Θ(L)=1−L\;\Theta(L) = 1-L, root on the unit circle → non-invertible.
  • Poorly identified: ML pins θ̂\hat\theta at −1-1; the ACF shows ρ1=−0.5\rho_1 = -0.5. A unit root in the MA polynomial — just as bad as one in the AR, only hidden.

Detrend or difference? The wrong cure leaves a fingerprint

A trending series is either trend-stationary (detrend it) or difference-stationary (difference it). Apply both and read the correlograms: over-differencing injects the −0.5-0.5 lag-1 spike; under-differencing leaves a slow-decaying ACF.

The four exhibits, weighed together

  1. Visual — wander? variance change? trend?
  2. ACF — fast decay (stationary) or slow/none (unit root)?
  3. Tests — ADF (H0H_0: unit root) + KPSS (H0H_0: stationary), together.
  4. Rule of thumb — σΔy/σy\sigma_{\Delta y}/\sigma_y.

When all four agree, the verdict is clear. When they conflict — judgment, and the cost asymmetry.

The cost asymmetry

When in doubt, difference.

  • Over-differencing: misspecified MA(1), but inference on coefficients of interest survives. Detectable.
  • Spurious regression: a confidently wrong answer — big tt, high R2R^2, doesn’t replicate. The output looks good.

The asymmetry is real. Spurious regression is the wrongful conviction you can’t undo.

Practice: run the method yourself

We built one case together (a synthetic known-truth series, then FRED UNRATE — genuinely borderline). Now five fresh series, increasing difficulty, full evidence bundle each:

  1. Easy stationary AR(1) — clear call.
  2. Trend-stationary — choose the right ADF spec or misclassify.
  3. Near unit root, short sample — honest “I don’t know” → difference.
  4. Random walk with drift — a trend-looking series that isn’t trend-stationary.
  5. FRED UNRATE — genuinely borderline; the lesson is the ambiguity.

Practice 1 · easy stationary AR(1)

Evidence Value 5% CV / cutoff Reading
ADF τμ\tau_\mu −9.84-9.84 −2.87-2.87 Reject unit root
KPSS ημ\eta_\mu 0.2650.265 0.4630.463 Fail to reject stationarity
Ratio σΔy/σy\sigma_{\Delta y}/\sigma_y 1.121.12 0.50.5 Well above cutoff

Verdict: Stationary. Easy call — all three agree.

Practice 2 · trend-stationary

Evidence Value 5% CV Reading
ADF τμ\tau_\mu (drift) −2.30-2.30 −2.87-2.87 Fail — misreads the trend
ADF ττ\tau_\tau (trend) −9.37-9.37 −3.42-3.42 Rejects unit root
KPSS ητ\eta_\tau (trend) 0.0770.077 0.1460.146 Fail to reject trend-stationarity

Verdict: Trend-stationary. Lesson: pick the right ADF spec, or you misclassify.

Practice 3 · near unit root, short sample

Evidence Value 5% CV / cutoff Reading
ADF τμ\tau_\mu −2.63-2.63 −2.90-2.90 Fail — low power
KPSS ημ\eta_\mu 0.3170.317 0.4630.463 Fail to reject
Ratio 0.370.37 0.50.5 Borderline

Verdict: honest “I don’t know.” Both fail — the ϕ=0.95\phi=0.95 vs. 1.01.0 ambiguity. Apply the cost asymmetry: difference.

Practice 4 · random walk with drift

Evidence Value 5% CV Reading
ADF τμ\tau_\mu (drift) 1.371.37 −2.87-2.87 Fail
ADF ττ\tau_\tau (trend) −2.98-2.98 −3.42-3.42 Fail — still can’t reject
KPSS ητ\eta_\tau (trend) 0.5150.515 0.1460.146 Rejects trend-stationarity

Verdict: Difference-stationary. A trend-looking series need not be trend-stationary — the “trend” is a random walk with drift.

Practice 5 · FRED unemployment

Evidence Value 5% CV / cutoff Reading
ADF τμ\tau_\mu −3.79-3.79 −2.86-2.86 Rejects unit root
KPSS ημ\eta_\mu 0.8440.844 0.4630.463 Rejects stationarity
Ratio 0.240.24 0.50.5 Favors differencing

Verdict: genuinely borderline — the tests conflict, and the series has decades-long excursions consistent with high persistence. The ambiguity is the lesson; apply the cost asymmetry and difference.

Key takeaways

  1. Stationarity is a verdict, not a measurement — build a case from multiple sources.
  2. The DF regression rearranges the AR(1) so the LHS is stationary under H0H_0; the stat is the tt-stat on γ̂\hat\gamma.
  3. Under H0H_0 that statistic is not normal — use MacKinnon values (they’re just the quantiles you simulated).
  4. ADF + KPSS (opposite nulls) give confirmatory analysis; both failing to reject = the data can’t discriminate.
  5. Cost asymmetry: spurious regression >> over-differencing. When in doubt, difference — unless it’s trend-stationary, then detrend.

Next time

  • Beyond AR(1): general AR(p)(p) and MA(q)(q).
  • Reading the ACF and PACF together — the correlogram fingerprints of pp and qq.
  • The Wold decomposition — why every well-behaved stationary series is AR + MA + noise.

Bring your laptop.