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 week’s cliffhanger: two independent random walks handed us a beautiful \(R^2\) and a fake-significant slope.

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

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

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\)

\[\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 \(\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 \(\rho_k = \phi^k\) — only a noisy sample estimate. Crank \(T\) up and it converges; shrink \(T\) and push \(\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 \(\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): \(\;y_t = \alpha + \phi\,y_{t-1} + \epsilon_t.\)

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

Building the DF regression

Subtract \(y_{t-1}\) from both sides and let \(\gamma = \phi - 1\):

\[\Delta y_t = \alpha + \gamma\,y_{t-1} + \epsilon_t, \qquad H_0: \gamma = 0 \;\;(\phi=1), \quad H_1: \gamma < 0.\]

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

Three specifications — pick to match the plot

\[\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 \(t\)-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

\[\alpha_{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 \(T\); as \(T\to\infty\), the drift 5% cutoff \(\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 = 200\) this returns \(-2.876\); our Monte-Carlo 5% quantile was \(\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 \(t\)-ratio. On a stationary AR(1) (\(\phi = 0.7\), \(T = 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.86\)
5% MacKinnon CV (\(T=200\)) \(-2.88\)
Reject the unit root? Yes (\(-4.86 < -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.86\) \(-3.46\) \(-2.88\) \(-2.57\)

Matches the by-hand \(\tau\) (up to a small degrees-of-freedom difference). Doing it once by hand demystifies the package — then we use the package.

Lag selection

How many lagged differences \(p\)? 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 \(p_{\max} = \lfloor 12\,(T/100)^{1/4} \rfloor\) and trim insignificant top lags.

KPSS: the reverse null

Test \(H_0\) \(H_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.231\) \(0.347\) \(0.463\) \(0.739\)

\(0.231 < 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 (\(H_0\): unit root) KPSS (\(H_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 \(\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 (\(H_0\): unit root) and KPSS (\(H_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, \[\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), \(\dfrac{\sigma_{\Delta y}}{\sigma_y} = \sqrt{2(1-\phi)}\): it’s \(\sqrt{2}\) at white noise and \(\to 0\) as \(\phi\to 1\). The \(<0.5\) cutoff flags \(\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), \[\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 \[\frac{\sigma_{\Delta y}}{\sigma_y} = \sqrt{2(1-\phi)}.\]

\(\sqrt2\) at white noise, \(\to 0\) as \(\phi\to1\). If differencing shrinks the spread a lot, the levels were accumulating shocks.

Order of integration & the over-differencing tax

\(I(d)\) = number of differences to reach stationarity. \(I(0)\) already stationary; \(I(1)\) most common in economics; \(I(2)\) rare. Over-difference a trend-stationary series and you introduce a non-invertible MA(1) (\(\theta = -1\)) — the tell-tale \(-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: \(y_t = \alpha + \delta t + u_t\) with \(u_t\) stationary. The correct move is to detrend. Difference instead:

\[\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 \(u_t\) is white noise, \(\Delta u_t = \epsilon_t - \epsilon_{t-1}\) is an MA(1) with \(\theta = -1\): \(\;\Theta(L) = 1-L\), root on the unit circle → non-invertible.
  • Poorly identified: ML pins \(\hat\theta\) at \(-1\); the ACF shows \(\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\) 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 (\(H_0\): unit root) + KPSS (\(H_0\): stationary), together.
  4. Rule of thumb\(\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 \(t\), high \(R^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\) \(-2.87\) Reject unit root
KPSS \(\eta_\mu\) \(0.265\) \(0.463\) Fail to reject stationarity
Ratio \(\sigma_{\Delta y}/\sigma_y\) \(1.12\) \(0.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.87\) Fail — misreads the trend
ADF \(\tau_\tau\) (trend) \(-9.37\) \(-3.42\) Rejects unit root
KPSS \(\eta_\tau\) (trend) \(0.077\) \(0.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.90\) Fail — low power
KPSS \(\eta_\mu\) \(0.317\) \(0.463\) Fail to reject
Ratio \(0.37\) \(0.5\) Borderline

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

Practice 4 · random walk with drift

Evidence Value 5% CV Reading
ADF \(\tau_\mu\) (drift) \(1.37\) \(-2.87\) Fail
ADF \(\tau_\tau\) (trend) \(-2.98\) \(-3.42\) Fail — still can’t reject
KPSS \(\eta_\tau\) (trend) \(0.515\) \(0.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\) \(-2.86\) Rejects unit root
KPSS \(\eta_\mu\) \(0.844\) \(0.463\) Rejects stationarity
Ratio \(0.24\) \(0.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 \(H_0\); the stat is the \(t\)-stat on \(\hat\gamma\).
  3. Under \(H_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)\) and MA\((q)\).
  • Reading the ACF and PACF together — the correlogram fingerprints of \(p\) and \(q\).
  • The Wold decomposition — why every well-behaved stationary series is AR + MA + noise.

Bring your laptop.