Cointegration and Error Correction

Module 10 · A night out with Harry, Karen, and Mouse

Gary Cornwall

Econ 6376 · The George Washington University

Act I · Last call

Three characters. Two relationships to investigate.

Where we are

yt=α+∑j=1pϕjyt−j+∑ℓ=0qβℓxt−ℓ+ϵty_t=\alpha+\sum_{j=1}^{p}\phi_jy_{t-j} +\sum_{\ell=0}^{q}\beta_\ell x_{t-\ell}+\epsilon_t

Mixing-board channel Today
Intercept, outcome memory, predictor lags Keep the ARDL framework
Explicit MA terms and deterministic trend Off in our baseline relation
Connection between I(1) levels Ask whether a stationary combination exists

Module 9: does one history help predict another?

What if the levels wander, but their relationship does not?

Harry and his puppy meet Karen at the bar

Generated story illustration: Harry in teal, Karen in coral, and Mouse the cream-colored puppy at a bar.
Harry · Karen · Mouse

A drunk walks. A puppy follows every new scent.

Generated illustration of Harry, Karen, and Mouse wandering at night without a physical tether.
If I lose sight of each one, how uncertain is the next location?

Harry notices Mouse. Mouse hears Harry.

ΔHt=a(Mt−1−Ht−1)+ϵtHΔMt=−b(Mt−1−Ht−1)+ϵtMΔKt=ϵtK\begin{aligned} \Delta H_t&=a(M_{t-1}-H_{t-1})+\epsilon_t^H\\ \Delta M_t&=-b(M_{t-1}-H_{t-1})+\epsilon_t^M\\ \Delta K_t&=\epsilon_t^K \end{aligned}

Mouse is ahead. Which way does each correction point?
The gap can influence the next step. New shocks still matter.

Build the next step

gap <- mouse[t] - harry[t]
harry[t + 1] <- harry[t] + 0.1 * gap + shocks[t, 1]
mouse[t + 1] <- mouse[t] - 0.1 * gap + shocks[t, 2]
karen[t + 1] <- karen[t]             + shocks[t, 3]

Same shocks, different rules. Keep 240 observations after 1,000 initial steps.

Predict three plots: locations, changes, and the gap.

Where did everyone go?

Static reference: baseline paths

Baseline: correction 0.20, long-run slope 1.00; the same path used in the notes.

A random walk can look stable over a short window. Extend the walk; appearance alone is not a test.

Act II · What stays stable?

Keep your eye on the relationship.

Their steps are noisy

A model of changes alone has no explicit measure of how far apart they are.

Their separation tells a different story

Which object wanders? Which object fluctuates around a stable relationship?

This is cointegration

xt∼I(1),yt∼I(1)x_t\sim I(1),\qquad y_t\sim I(1)

zt=yt−c−κxt∼I(0)\boxed{z_t=y_t-c-\kappa x_t\sim I(0)}

The individual levels wander. A fixed weighted combination is stationary.

For Harry and Mouse: y=My=M, x=Hx=H, c=0c=0, κ=1\kappa=1.

Name the stationary object.

The weights matter

Suppose xtx_t is I(1) and ztz_t is I(0):

yt=2+3xt+zt.y_t=2+3x_t+z_t.

Would you plot yt−xty_t-x_t or yt−2−3xty_t-2-3x_t?

yt−xt=2+2xt+ztstill contains the wandering component.y_t-x_t=2+2x_t+z_t\quad\text{still contains the wandering component.}

Return to the walkers: change the long-run slope

What the story does not establish

Tempting shortcut What we still need
“They have a high correlation.” A stationary combination of I(1) levels
“Both trend upward.” Stochastic trends, not just deterministic growth
“The gap is stationary.” Not necessarily white noise, small, or bounded
“Harry is on the right-hand side.” Separate assumptions for exogeneity and causation
Could they be connected without moving in the same direction?

Murray’s other story: the teeter-totter

Generated conceptual illustration of Harry and Mouse on opposite sides of a safely balanced teeter-totter.
A weighted sum can be stable. The long-run slope can be negative.

Act III · Would we detect it?

In a simulation we know the relationship. In data we estimate and test it.

Estimate the relationship before testing it

Mt=ĉ+κ̂Ht+et,et=Mt−ĉ−κ̂HtM_t=\hat c+\hat\kappa H_t+e_t, \qquad e_t=M_t-\hat c-\hat\kappa H_t

levels_fit <- lm(Mouse ~ Harry, data = connected)
e <- residuals(levels_fit)

Then make the same comparison for Karen on Harry.

Did fitting a line remove the wandering part?

Same operation. Different residual paths.

A suggestive plot—or sufficient evidence?

Engle–Granger: test the estimated deviation

Δet=γet−1+∑j=1peψjΔet−j+ϵtADF\Delta e_t=\gamma e_{t-1} +\sum_{j=1}^{p_e}\psi_j\Delta e_{t-j}+\epsilon_t^{ADF}

H0:no cointegrationH1:stationary combinationH_0:\text{no cointegration}\qquad H_1:\text{stationary combination}

τEG=γ̂sê(γ̂)\tau_{EG}=\frac{\hat\gamma}{\widehat{\operatorname{se}}(\hat\gamma)}

More negative values favor reversion. Lagged differences address short-run dependence.

Same t-ratio. A different reference distribution.

The residual was chosen by fitting the levels relationship.

Ordinary regression t-values and ordinary ADF critical values do not calibrate this test.

test <- eg_test(y = connected$Mouse, x = connected$Harry,
                p_adf = 1)
c(statistic = test$statistic, critical_5pct = test$cv5)
This helper: two variables · intercept, no trend · 5% Engle–Granger reference.

Harry and Mouse pass this test. Karen does not.

Relation EG statistic 5% critical value Decision
Mouse on Harry -4.767 -3.362 Reject no cointegration
Karen on Harry -0.598 -3.362 Do not reject

240 levels observations · one lagged residual difference in each test.

Rejection supports cointegration under the specification. Nonrejection is not proof of absence.

Turn down the response. Then turn it off.

Which change alters the population property? Which makes it harder to detect?

Replay the walkers with weak correction or correction off

A stable relationship can evade a short sample

World Cointegrated in DGP? EG statistic Reject at 5%?
Connected Yes -4.767 Yes
Slow Yes -2.731 No
Disconnected No -2.357 No

Common 5% critical value: -3.362.

Slow adjustment creates a power problem here. The test does not change the DGP.

Act IV · OK… now what?

We identified the relationship. Can it tell us about the next step?

The call and response

Generated story illustration: Harry and Mouse notice one another and turn toward each other, without a leash.
Yesterday’s separation helps explain today’s movement.

Mouse is ahead. What does the correction contribute?

zt−1=Mt−1−Ht−1,ΔMt=−0.1zt−1+ϵtMz_{t-1}=M_{t-1}-H_{t-1},\qquad \Delta M_t=-0.1z_{t-1}+\epsilon_t^M

Previous gap Mouse’s correction
+2+2 −0.2-0.2
−2-2 +0.2+0.2
Must the observed gap shrink by 10%?

We already know the starting model

yt=α+ϕ1yt−1+β0xt+β1xt−1+ϵty_t=\alpha+\phi_1y_{t-1}+\beta_0x_t+\beta_1x_{t-1}+\epsilon_t

Subtract yt−1y_{t-1} and write xt=xt−1+Δxtx_t=x_{t-1}+\Delta x_t:

Δyt=α+(ϕ1−1)yt−1+(β0+β1)xt−1+β0Δxt+ϵt.\Delta y_t=\alpha+(\phi_1-1)y_{t-1} +(\beta_0+\beta_1)x_{t-1}+\beta_0\Delta x_t+\epsilon_t.

Can we collect the two lagged levels into yesterday’s gap?

The same equation, with the relationship visible

Δyt=λ(yt−1−c−κxt−1)⏟previous deviation+β0Δxt+ϵt\Delta y_t=\lambda\underbrace{(y_{t-1}-c-\kappa x_{t-1})}_{\text{previous deviation}} +\beta_0\Delta x_t+\epsilon_t

λ=ϕ1−1,c=α1−ϕ1,κ=β0+β11−ϕ1(ϕ1≠1).\lambda=\phi_1-1,\qquad c=\frac{\alpha}{1-\phi_1},\qquad \kappa=\frac{\beta_0+\beta_1}{1-\phi_1}\quad(\phi_1\ne1).

Error correction: short-run changes plus a response to yesterday’s deviation.

The rearrangement is algebra. A stationary deviation supplies the cointegration interpretation.

Estimate Mouse’s response

ecm_fit <- lm(dm ~ e_lag + dh, data = ecm_data)

ΔMt=0.014−0.151et−1−0.060ΔHt+etECM\Delta M_t=0.014 -0.151e_{t-1} -0.060\Delta H_t+e_t^{ECM}

Here et−1=Mt−1−ĉ−κ̂Ht−1e_{t-1}=M_{t-1}-\hat c-\hat\kappa H_{t-1}.

True Mouse adjustment: −0.100. Estimated adjustment: -0.151.

A larger gap gives a larger corrective contribution

This plots one fitted term—not the whole observed change.

Who adjusts is a separate question

  • Harry could wander freely while Mouse does the correcting.
  • A weak response in one equation does not refute a relationship.
  • A negative coefficient alone does not establish cointegration or system stability.
  • A predictive adjustment is not automatically a policy effect.
If only Mouse responds, does that make Harry exogenous for every question?

Act V · Back to economics

An appealing story gives us a question. The data still get a vote.

Economists look for relationships that can persist

Candidate relationship What has been learned?
Consumption and income Engle–Granger (1987) find evidence in their historical sample
Long and short interest rates Their yield example also supports a long-run relation
Purchasing-power parity Hamilton’s U.S.–Italy example finds little evidence

Use cointegration to assess a proposition, estimate a relation, and retain it in dynamics.

Does finding some slope establish the slope the theory requires?

Do U.S. consumption and income share a stable log relation?

1959Q1–2009Q3 · aggregate real total consumption and disposable income · 203 quarters · December 2009 archive

First: is I(1) a defensible working description?

Series Deterministics ADF statistic 5% critical value
Log consumption Intercept + trend -2.435 -3.43
Log income Intercept + trend -1.908 -3.43
Change in log consumption Intercept -5.082 -2.88
Change in log income Intercept -6.351 -2.88

Four lagged differences in each individual-series test.

Levels do not reject; changes do. This supports a working I(1) setup—not proof.

An excellent fit can leave the question unresolved

Slope 1.032 · R2=R^2= 0.9984 · EG -2.589 vs. CV -3.367

What happens when we change the augmentation?

Lagged residual differences Test rows EG statistic Reject at 5%?
0 202 -3.397 Yes
2 200 -2.898 No
4 198 -2.589 No
8 194 -2.032 No

Same 203 levels observations and -3.367 critical value.

Can we simply choose the zero-lag rejection?

The zero-lag rejection leaves a warning in its residuals

These are the test regression’s remaining residuals. Dashed bands are descriptive—not a joint whiteness test.

This sample has not earned a validated economic ECM

The baseline does not reject no cointegration at 5%.

The zero-lag rejection is sensitive to augmentation and has weaker diagnostic support.

We have insufficient evidence here for an established stable relation. We have not shown that consumption and income are unrelated.
What would further investigation need to document?

Act VI · Bring the story home

A relationship, a test, and a disciplined interpretation.

What belongs in the empirical report?

  1. Data: definitions, units, transformations, dates, frequency, vintage.
  2. I(1) assessment: evidence and its limitations.
  3. Test: normalization, deterministic terms, lags, matching reference values.
  4. Evidence: statistic, decision, diagnostics, declared sensitivity.
  5. Interpretation: justified dynamics and the claims that remain unresolved.
Could another analyst reproduce both your decision and your doubts?

What Harry and Mouse taught us

Cointegration: I(1) levels can have an I(0) weighted relationship.

Not enough: correlation, matching trends, significance stars, or a causal story.

Engle–Granger: estimate the relation; test its residual with the right calibration.

Error correction: keep yesterday’s deviation alongside short-run changes.

Economics: motivate the relation, then let the evidence qualify the claim.

Next: give each variable its own equation

ARMA→ARDL→VAR\text{ARMA}\quad\longrightarrow\quad\text{ARDL}\quad\longrightarrow\quad\text{VAR}

Module 11: build a system in which each variable can respond to the others’ histories.

Module 13: return to error correction inside that system.

Looking ahead: with several variables, cointegrating rank counts independent stationary relationships. Johansen’s system approach asks about that rank.