Module 13: Forecast Uncertainty, Predictive Information, and Error Correction

Applied Time Series Econometrics Β· Econ 6376

How to use these notes

Imagine writing a quarterly unemployment forecast. Your colleague asks which shocks make the forecast uncertain. Another asks whether wage growth helps predict unemployment. A third asks whether your model throws away useful information when you difference the series. Each question calls for a different exhibit. By the end of the chapter you should be able to choose the exhibit, read it, and explain the assumptions behind your answer.

The six Core sections are the reading path for everyone. Practice reading the supplied tables, naming the null in words, choosing a model, and predicting the direction of adjustment. The Deeper Dives and Technical Note develop the matrix algebra and test statistics. Each code panel opens to show the R that produced the exhibit. For a local rerun, start in the course folder or its notes subfolder with vars, urca, ggplot2, lmtest and knitr installed. The course supplies the two Granger test helpers, the cointegration helpers, and the consumption and income data. Run the chunks in order.

Show R code
library(vars)
library(urca)
library(ggplot2)
course_dir <- if (file.exists("helpers/granger_utils.R")) "." else ".."
source(file.path(course_dir, "helpers", "granger_utils.R"))
source(file.path(course_dir, "helpers", "cointegration_utils.R"))
knitr::opts_chunk$set(fig.width = 8, fig.height = 4.3, fig.align = "center")
theme_set(theme_minimal(base_size = 12))

13.1 Whose shocks make the forecast uncertain? β€” Core

Stand at the end of quarter tt and make a forecast of yy for next quarter. Tomorrow’s surprises can make that forecast miss. Now forecast yy four quarters ahead from the same date. A surprise next quarter can propagate for three more quarters. A surprise in the fourth quarter can affect yy immediately. Your four-quarter miss contains the effects of all four sets of future surprises.

The forecast error variance decomposition (FEVD) gives the share of the forecast-error variance of a particular outcome, at a particular horizon, attributable to each shock under a specified identification. It describes the uncertainty you face when making the forecast. Explaining one unusually large miss after it happens is a different exercise that also requires the realized shocks.

From one response to one variance share

Return to the two-equation system in Modules 11–12. Two shocks arrive each period, each with mean zero and variance one. They are uncorrelated with one another and across dates. In the generating system a one-standard-deviation yy shock raises yy on impact by 8/78/7. An equally standardized xx shock raises yy by 4/74/7. The first shock enters the forecast error with twice the weight. How much more variance does it contribute?

Variance scales with the square of the weight. The yy shock contributes (8/7)2=64/49(8/7)^2=64/49 and the xx shock contributes (4/7)2=16/49(4/7)^2=16/49. Uncorrelated contributions add to 80/4980/49 squared units of yy. The xx shock therefore accounts for 16/8016/80, or 20%, of the one-quarter uncertainty. A negative impact of the same magnitude would give the same share. Read the signed impulse response function (IRF) when the direction matters.

At four quarters use the impact response, the one-quarter response, the two-quarter response, and the three-quarter response. Each belongs to an innovation arriving on a different date. Square each weight, add within each shock, and divide by the total across shocks. That logic extends Module 6’s calculation of a forecast-error variance from the weights on future innovations.

Show R code
B <- matrix(c(1, -.5, -.25, 1), 2, byrow = TRUE)
structural_lags <- matrix(c(.3, 0, .1, .4), 2, byrow = TRUE)
A1 <- solve(B, structural_lags)
C_true <- solve(B)                      # structural shock variances are one
Sigma <- tcrossprod(C_true)
C_yfirst <- t(chol(Sigma))

account_for_y <- function(impact, horizons = 8L) {
  response <- impact
  contributions <- c(y = 0, x = 0)
  result <- matrix(NA_real_, horizons, 4,
                   dimnames = list(NULL, c("IRF_x", "Total", "Share_y", "Share_x")))
  for (h in seq_len(horizons)) {
    contributions <- contributions + response[1, ]^2
    total <- sum(contributions)
    result[h, ] <- c(response[1, 2], total, contributions / total)
    response <- A1 %*% response
  }
  as.data.frame(result)
}
truth <- account_for_y(C_true)
recursive <- account_for_y(C_yfirst)
h <- c(1L, 4L)
stopifnot(isTRUE(all.equal(truth$Total, recursive$Total)),
          abs(truth$Share_x[1] - .2) < 1e-12, recursive$Share_x[1] == 0)
knitr::kable(data.frame(
  Quarters = h, Variance = truth$Total[h],
  "Generating x shock (%)" = 100 * truth$Share_x[h],
  "Second shock, y first (%)" = 100 * recursive$Share_x[h],
  check.names = FALSE), digits = c(0, 5, 2, 2),
  caption = "Population forecast-error variance of y and its allocation under two identifications.")
Population forecast-error variance of y and its allocation under two identifications.
Quarters Variance Generating x shock (%) Second shock, y first (%)
1 1.63265 20.00 0.0
4 2.42931 30.21 3.6

Under the generating structure, the xx shock’s share grows from 20.00% to 30.21%. Its lagged propagation matters for the longer forecast. Now read across the table. The alternative identification orders yy first and assumes its within-quarter response to the second shock is zero. That restriction makes the second shock’s one-quarter share zero by construction. The same shock in this recursive model can reach yy through lagged adjustment, giving it 3.60% at four quarters. The recursive second shock and the generating xx disturbance are two different definitions of a shock.

On the course mixing board, FEVD reads the dynamics and shocks already present in the VAR. Both analysts use identical reduced dynamics and innovation covariance. They agree on total variance, and hence on the magnitude of forecast uncertainty, at each horizon. How they assign that variance depends on the contemporaneous restrictions. The simulator knows which shocks generated the observations. An analyst working with economic data must defend the identification.

Show R code
shapes <- rbind(
  data.frame(time = 0:7, value = truth$IRF_x,
             panel = "IRF (y units above baseline)"),
  data.frame(time = 1:8, value = 100 * truth$Share_x,
             panel = "FEVD (percent of error variance)"))
shapes$panel <- factor(shapes$panel, levels = unique(shapes$panel))
ggplot(shapes, aes(time, value)) +
  geom_line(colour = "#176b72", linewidth = .9) +
  geom_point(colour = "#176b72", size = 2) +
  facet_wrap(~panel, scales = "free", ncol = 1) +
  scale_x_continuous(breaks = 0:8) +
  labs(x = "Quarters", y = NULL)
Two panels. The signed response of y to one x shock starts near 0.57 and falls toward zero. The x share of the forecast-error variance starts at 20 percent at one quarter and rises to just over 30 percent.
FigureΒ 1: In the generating system the response to one x shock declines after impact, while the shock’s share of forecast uncertainty grows across these horizons. The axes use different units and start at different horizons.

13.2 Read a Canadian unemployment FEVD β€” Core

A Canadian labor-market analyst forecasts the quarterly change in the unemployment rate. What should go in the forecast briefing at one quarter and one year? The Canada data contain 84 quarterly observations from 1980Q1 through 2000Q4. The stored employment (e), productivity (prod), and real manufacturing wage (rw) series already use 100 times a log. Their first differences measure log-point growth and approximate quarterly percentage changes. U is a rate in percent. Its first difference is a percentage-point change. Our four-quarter target is the change in the fourth quarter, forecast today. Canadian data definitions

Start with the archived two-lag VAR in these four changes and an intercept. All four change series reject an individual unit root at 5% in an ADF check with an intercept and two lagged differences. The fitted system’s largest companion eigenvalue modulus is 0.68, below one. These checks support treating the transformed dynamics as stable. They do not establish that every level needed differencing. Differencing an already stationary level can discard useful information, as can omitting a stationary combination of wandering levels. Section 13.4 takes up the latter possibility.

Show R code
data("Canada", package = "vars")
changes <- diff(Canada)
fit_ca <- VAR(changes, p = 2, type = "const")
adf_changes <- apply(changes, 2, function(z) {
  test <- ur.df(z, type = "drift", lags = 2)
  c(statistic = test@teststat[1], critical_5 = test@cval[1, "5pct"])
})
criteria <- VARselect(changes, lag.max = 4, type = "const")$selection
pt_ca <- serial.test(fit_ca, lags.pt = 8, type = "PT.adjusted")$serial
knitr::kable(t(adf_changes), digits = 2,
  caption = "Individual ADF checks on quarterly changes. Reject when the statistic is more negative than its critical value.")
Individual ADF checks on quarterly changes. Reject when the statistic is more negative than its critical value.
statistic critical_5
e -4.11 -2.89
prod -3.99 -2.89
rw -3.64 -2.89
U -3.79 -2.89

The Akaike criterion chooses two lags when comparing one through four on common rows. The Schwarz and Hannan–Quinn criteria choose one. We retain the historical two-lag specification and check its residual dynamics. A system-wide adjusted portmanteau test through eight quarters gives p=0.471p=0.471. It detects little joint evidence of remaining serial dependence. Section 13.3 checks the particular forecasting equations as well.

Read the target first, then the horizon and shocks

Order the changes as employment, productivity, real wage, unemployment. This recursive scheme lets unemployment respond within a quarter to innovations in all three other series. Employment, first, cannot respond on impact to later innovations. This is a working timing assumption. Quarterly aggregation makes a different timing assumption plausible. The code selects $U because unemployment change is the target. Every column describes a shock. fevd() returns fractions, which we multiply by 100 for display.

Show R code
hh <- c(1L, 4L, 8L)
share_ca <- fevd(fit_ca, n.ahead = max(hh))$U
# Psi includes impact in its first slice. Sum the squared responses of U.
variance_of_U <- function(fit, horizons) {
  response <- Psi(fit, nstep = max(horizons) - 1L)
  i <- match("U", colnames(fit$y))
  vapply(horizons, function(h) sum(response[i, , seq_len(h)]^2), numeric(1))
}
total_ca <- variance_of_U(fit_ca, hh)
knitr::kable(data.frame(
  Quarters = hh, Variance = total_ca,
  round(100 * share_ca[hh, ], 1), check.names = FALSE),
  digits = c(0, 4, 1, 1, 1, 1),
  caption = "Forecast-error variance of quarterly unemployment-rate change (squared percentage points) and percent shares of each recursive shock. Column order is the identifying order.")
Forecast-error variance of quarterly unemployment-rate change (squared percentage points) and percent shares of each recursive shock. Column order is the identifying order.
Quarters Variance e prod rw U
1 0.0862 46.2 0.2 4.1 49.4
4 0.1805 50.2 12.2 11.6 26.0
8 0.2095 46.8 14.4 15.5 23.3

At one quarter, unemployment’s own shock accounts for 49.4% of total variance and employment’s shock for 46.2%. At four quarters, the employment component is 50.2%, while the own component is 26.0%. The total variance rises from 0.0862 to 0.1805 squared percentage points. A falling share can accompany a rising variance contribution. Here the own contribution goes from about 0.0425 to 0.0469 squared percentage points. Use both the total and the share to support a claim about the size of a risk.

Put unemployment first and keep the other variables’ relative order, lag choice, and estimation rows fixed. What should its one-quarter own share be before you run the code?

Show R code
u_first <- c("U", "e", "prod", "rw")
other_fit <- VAR(changes[, u_first], p = 2, type = "const")
other_share <- fevd(other_fit, n.ahead = max(hh))$U
stopifnot(max(abs(total_ca - variance_of_U(other_fit, hh))) < 1e-10,
          max(abs(rowSums(share_ca) - 1)) < 1e-10,
          max(abs(rowSums(other_share) - 1)) < 1e-10)
knitr::kable(data.frame(
  Quarters = hh,
  "Own share, U last (%)" = 100 * share_ca[hh, "U"],
  "Own share, U first (%)" = 100 * other_share[hh, "U"],
  check.names = FALSE), digits = c(0, 1, 1),
  caption = "Same Canadian target and fitted reduced dynamics, two recursive definitions of the unemployment shock.")
Same Canadian target and fitted reduced dynamics, two recursive definitions of the unemployment shock.
Quarters Own share, U last (%) Own share, U first (%)
1 49.4 100.0
4 26.0 63.9
8 23.3 55.6

Under the second ordering, unemployment’s own share is 100% at one quarter and 63.9% at four. The original four-quarter estimate of 26.0% is conditional on letting the three other surprises reach unemployment within the quarter. A forecast briefing could report both allocations and explain which timing assumption the economist finds more credible. A high share does not tell us which forecasting model wins on held-out data. It also gives no sign for the effect of the shock on unemployment. R documentation for FEVD

13.3 Does another series’ history help predict the target? β€” Core

Suppose a forecaster knows the histories of unemployment changes, employment growth, and productivity growth. Would adding real-wage growth from the previous two quarters improve the model’s one-step prediction of the unemployment-rate change? This time the extra information is already available when the forecast is made. In the FEVD we were allocating the variance generated by future shocks. A wage series can supply useful lagged information even if the forecast is relatively insensitive to the shock labeled β€œwage” under a particular ordering.

In a linear VAR, the Granger noncausality null for this direction says that both coefficients on lagged wage growth in the unemployment-change equation equal zero, conditional on the retained histories. Fit the full equation, then fit the equation with both wage lags removed. Keep the same sample, intercept, and other lags. The full equation fits at least as well in sample because it has more freedom. The joint test asks whether the gain is large relative to the sampling variation under the null. Reverse the equation and the excluded lags to test the other direction. The two decisions can differ.

Why a predictive lag can appear

In the Module 11 generating model, yesterday’s xx had a direct coefficient of zero in today’s structural yy equation. But yesterday’s xx helps predict today’s xx, and today’s xx enters today’s yy. After solving the two simultaneous equations, the reduced yy equation has an xx-lag coefficient of 8/358/35. The forecast uses yesterday’s information and incorporates the indirect route through the rest of the system. Establishing which intervention moves yy requires economic identification beyond that predictive fact.

Test both directions in the Canadian system

Read the table at 5%. The first row asks whether wage history adds information for unemployment change. The second asks whether the history of unemployment changes adds information for wage growth. The last column checks the residuals of that row’s full equation. It is a separate diagnostic with a separate null.

Show R code
direction_test <- function(target, predictor) {
  rows <- model.frame(fit_ca$varresult[[target]])
  rows$const <- NULL                       # lm supplies the same intercept
  full <- lm(y ~ ., data = rows)
  remove <- paste0(predictor, ".l", 1:fit_ca$p)
  keep <- setdiff(names(rows), c("y", remove))
  reduced <- lm(reformulate(keep, response = "y"), data = rows)
  joint <- granger_nested_test(reduced, full)
  bg <- granger_bg_test(full, order = 4)
  data.frame(F = joint$F, df1 = joint$q, df2 = joint$df2,
             test_p = joint$p_value, BG_p = bg$p_value)
}
directions <- rbind(
  "Wage growth to unemployment change" = direction_test("U", "rw"),
  "Unemployment change to wage growth" = direction_test("rw", "U"))
knitr::kable(directions, digits = c(3, 0, 0, 4, 4),
  col.names = c("F", "df1", "df2", "Lag-test p", "BG(4) p"),
  caption = "Equation-specific lag tests on the same 81 estimation rows. BG checks for remaining serial dependence through four quarters.")
Equation-specific lag tests on the same 81 estimation rows. BG checks for remaining serial dependence through four quarters.
F df1 df2 Lag-test p BG(4) p
Wage growth to unemployment change 6.242 2 72 0.0032 0.065
Unemployment change to wage growth 0.648 2 72 0.5260 0.013

For wage growth predicting unemployment change, F(2,72)=6.24F(2,72)=6.24 and p=0.0032p=0.0032. The nominal test rejects joint exclusion. For unemployment change predicting wage growth, F(2,72)=0.65F(2,72)=0.65 and p=0.526p=0.526. The reverse test supplies little evidence against its null. Both comparisons retain the target’s own lags and the lags of employment and productivity. Neither requires assigning contemporaneous shocks, so permuting the same reduced system for FEVD leaves these directional tests unchanged.

Would you trust the forecast briefing? The course’s Breusch–Godfrey (BG) diagnostic drops the first four auxiliary observations so every residual lag is observed. For the wage equation it rejects at 5% (p=0.013p=0.013). For unemployment it gives p=0.065p=0.065, close enough to examine sensitivity. The common alternative of initializing missing residual lags at zero gives p=0.026p=0.026 for that equation. A joint portmanteau test across four equations can miss dependence picked up by a targeted diagnostic. The forward test is evidence of predictive content under this specification, with enough residual-dynamics uncertainty to warrant revisiting the model. The reverse nonrejection comes from an equation that fails the targeted check. A genuine forecasting-performance claim would require evaluation on forecasts made outside the estimation sample.

Show R code
rows_U <- model.frame(fit_ca$varresult$U)
rows_U$const <- NULL
zero_fill <- lmtest::bgtest(lm(y ~ ., data = rows_U), order = 4, fill = 0)
stopifnot(zero_fill$p.value < .05)

Which R test? In this four-variable system, vars::causality(fit_ca, cause = "rw")$Granger tests the wage lag block across all three remaining equations. Our question names unemployment alone, so we tested only that equation. The separately labeled instantaneous-causality output concerns contemporaneous innovation covariance. R documentation for causality tests

13.5 Who adjusts when the gap opens? β€” Core

A vector error correction model writes an equation for the change in each variable. The predictors are lagged changes and one or more lagged deviations from long-run relationships. Yesterday’s gap is known when we make today’s forecast. A variable’s coefficient on the gap is its adjustment loading. Here is the population model used to generate the two walkers, with the gap oriented as Mouse minus Harry:

Ξ”Mt=βˆ’0.10(Mtβˆ’1βˆ’Htβˆ’1)+Ο΅tM,Ξ”Ht=+0.10(Mtβˆ’1βˆ’Htβˆ’1)+Ο΅tH. \begin{aligned} \Delta M_t &= -0.10(M_{t-1}-H_{t-1})+\epsilon_t^M,\\ \Delta H_t &= +0.10(M_{t-1}-H_{t-1})+\epsilon_t^H. \end{aligned}

Give the gap a sign before reading a loading. If Mouse is two units ahead, her expected next change is βˆ’0.20-0.20 and Harry’s is +0.20+0.20. The expected separation shrinks by 0.400.40. Their new shocks can still push them apart on a particular day. If you instead define the gap as Harry minus Mouse, both loadings reverse signs and both predictions stay the same. The weights defining the relationship tell you how to measure the gap. The loadings tell you who moves in response.

What differencing alone would discard

Imagine two histories with identical recent changes. In one, Mouse and Harry are together. In the other, Mouse is two units ahead. A VAR that uses only those recent changes as predictors gives the same forecast of changes in the two histories. The VECM above gives zero expected movement in the first history and opposite movements in the second. A levels forecast from a changes model still starts from the observed level. What that model omits is the dependence of future changes on the starting gap.

Now switch off Harry’s response. Mouse still closes one tenth of the separation per period. Starting from the same two-unit gap, the expected separation after four periods is about 1.31 units, compared with 0.82 when both respond. One participant’s adjustment is enough to stabilize the gap here. Switching off both responses would let the gap wander as each receives independent steps.

Show R code
gap_h <- 0:8
gaps <- rbind(data.frame(h = gap_h, gap = 2 * .8^gap_h, case = "Both respond"),
              data.frame(h = gap_h, gap = 2 * .9^gap_h, case = "Only Mouse responds"))
ggplot(gaps, aes(h, gap, colour = case, linetype = case)) +
  geom_line(linewidth = .95) + geom_point(size = 1.8) +
  scale_colour_manual(values = c("#176b72", "#994518")) +
  scale_x_continuous(breaks = gap_h) + expand_limits(y = 0) +
  labs(x = "Periods ahead", y = "Expected gap (location units)",
       colour = NULL, linetype = NULL) + theme(legend.position = "bottom")
Two curves start at a gap of two. When both respond the gap falls more quickly, reaching about 0.82 by period four. When only Mouse responds it reaches 1.31 at that horizon.
FigureΒ 2: Conditional mean separation from the same starting gap under two sets of adjustment coefficients. Both scenarios use the same zero expected future innovations.

Closing the gap allows both levels to keep moving. Add the same unit to both starting locations and keep the same future steps. Every future location shifts up by one, and the future separation follows exactly the old path. Thus a common displacement can be permanent even when deviations from the relationship are temporary.

Estimate the relation and use it to forecast

The system trace test selected rank one for the walkers. Fit that rank and normalize the coefficient on Mouse to one. The estimated gap is zΜ‚tβˆ’1=Mtβˆ’1βˆ’0.934Htβˆ’1βˆ’0.949\widehat z_{t-1}=M_{t-1}-0.934H_{t-1}-0.949. The loadings below give the contribution of one positive unit of this estimated gap to the next change holding the lagged changes fixed.

Show R code
walk_vecm <- cajorls(jo_walk, r = 1)
gap_weights <- drop(walk_vecm$beta)
loadings <- coef(walk_vecm$rlm)["ect1", ]
knitr::kable(data.frame(
  Equation = c("Change in Mouse", "Change in Harry"),
  Generating = c(-.10, .10), Estimated = as.numeric(loadings)),
  digits = 3, caption = "Adjustment coefficients for a gap normalized on Mouse.")
Adjustment coefficients for a gap normalized on Mouse.
Equation Generating Estimated
Change in Mouse -0.1 -0.153
Change in Harry 0.1 0.072

Mouse’s fitted change falls by about 0.153 units and Harry’s rises by about 0.072 units per positive gap unit. The population weights and loadings used to simulate the data differ from these finite-sample estimates. In Module 10 the conditional scalar equation could also include current Ξ”xt\Delta x_t. Here each equation forecasts with information available one period earlier. Current movements in the other variable are part of the joint outcome to forecast.

Predict the walkers’ locations from the last observed positions. vec2var() expresses the fitted rank-one system in levels, preserving the estimated long-run restriction. The forecast of the fitted gap is the same linear combination of the two level forecasts and the fitted constant. Row zero records the observed starting point.

Show R code
walk_levels <- vec2var(jo_walk, r = 1)
paths <- predict(walk_levels, n.ahead = 4)$fcst
loc <- rbind(tail(MH, 1), cbind(Mouse = paths$Mouse[, "fcst"],
                                 Harry = paths$Harry[, "fcst"]))
gap_path <- drop(cbind(loc, 1) %*% gap_weights)
knitr::kable(data.frame(Period = c(0L, 1L, 4L),
                        loc[c(1, 2, 5), , drop = FALSE],
                        Fitted_gap = gap_path[c(1, 2, 5)]),
             row.names = FALSE, digits = 3,
             caption = "Observed locations at the origin and rank-one VECM point forecasts. The last column evaluates the fitted equilibrium gap.")
Observed locations at the origin and rank-one VECM point forecasts. The last column evaluates the fitted equilibrium gap.
Period Mouse Harry Fitted_gap
0 3.816 3.492 -0.396
1 3.861 3.441 -0.304
4 3.982 3.396 -0.140

The fitted gap starts at βˆ’0.396 and moves toward zero, reaching βˆ’0.140 at horizon four. The levels are free to move while that happens. Finite-horizon level IRFs and FEVDs remain meaningful for this system. Some level responses can persist and long-horizon forecast uncertainty can keep growing with the common stochastic trend. Shock attribution still needs an identification assumption.

Return to the Granger question

Where could Mouse’s history help predict Harry? A short-run route would enter through lagged changes in Mouse’s position. A second route runs through yesterday’s level in the equilibrium gap. Our generating system has no lagged changes at all, yet increasing yesterday’s Mouse location by one at fixed Harry location increases Harry’s expected next change by 0.10. Testing the lagged changes alone misses that route. When we turned off Harry’s loading, we closed his gap route. In that generating system there was no short-run route left. The general system test must account for both.

13.6 Choose the evidence and write the conclusion β€” Core

Read the question first. β€œDoes it matter?” might ask about a signed response, a share of risk, the information in a predictor, or a persistent relationship. Each requires different evidence.

An economist asks Choose this exhibit Include in your answer
Where is yy four quarters after one shock relative to its baseline? Signed IRF at horizon four Named shock, normalization, identification, direction and response units.
Which shocks account for uncertainty in the four-quarter forecast of yy? FEVD row for that target and horizon Identification, share, total forecast-error variance when comparing magnitudes.
Does past wage growth help predict next quarter’s unemployment change? Directional joint lag test in the unemployment equation Excluded lags, retained histories, decision and residual diagnostic.
Can we justify preserving a consumption–income gap when forecasting? Individual integration evidence and system rank table Sample, lag and deterministic specification, selected rank and sensitivity.
When the fitted gap is positive, who tends to close it? Normalized relation and one adjustment coefficient per equation Gap sign, each loading’s sign and units, other predictors held fixed.

Try these on paper.

  1. An analyst says the xx shock accounts for 30.2% of the four-quarter variance in the generating example, so it raised yy in the fourth quarter of a particular year. Which additional exhibit would answer the direction question? What additional information would a historical attribution require?
  2. In the Canadian briefing, how can two analysts report the same four-quarter total variance but own-shock shares of 26.0% and 63.9%? Explain one result that survives reordering.
  3. A headline says that lowering real wages would reduce unemployment because wage lags help predict unemployment changes. Rewrite it as a defensible two-sentence report.
  4. Read the first and last rows of the consumption–income rank table. Which model would you start with if drift is economically plausible? Which result deserves mention even if you choose that model?
  5. Mouse is one unit behind Harry in the generating system. Give the predicted sign of each change, then explain whether the two locations must return to where they started.
  6. A VECM has zero coefficients on all lagged changes of xx in the yy equation. Which remaining term must you inspect before concluding that xx’s history adds no one-step predictive information?
  1. The IRF supplies a signed response to a specified shock. Attributing a historical realization also requires recovered, identified shocks over the relevant dates.
  2. The factorization changes the innovations called β€œown.” The total variance stays about 0.1805 squared percentage points. The reduced-form lag test is also invariant to reordering the same model.
  3. Given the other histories, the joint test rejects excluding the two wage lags from the unemployment-change equation (nominal p=0.0032p=0.0032). Residual diagnostics qualify the inference and the model does not identify an intervention.
  4. The drift-allowing specification supports a changes VAR as a starting point. Restricting the constant to the relation selects one gap, so the deterministic specification matters.
  5. A gap of βˆ’1 adds +0.10 to Mouse’s next change and βˆ’0.10 to Harry’s. New shocks can shift both levels permanently while the separation stays stationary.
  6. Check whether xx enters the lagged levels contribution to yy through the fitted equilibrium relationship and its loading.

Deeper Dive β€” Deriving the variance shares

Hold the model parameters fixed. At every date uu, assume E(π›œuβˆ£β„±uβˆ’1)=𝟎E(\boldsymbol\epsilon_u\mid\mathcal F_{u-1})=\mathbf 0 and Var(π›œuβˆ£β„±uβˆ’1)=𝚺\operatorname{Var}(\boldsymbol\epsilon_u\mid\mathcal F_{u-1})=\boldsymbol\Sigma, where β„±uβˆ’1\mathcal F_{u-1} is the information available just before that date. Iterated expectations then give zero cross-date covariance conditional on β„±t\mathcal F_t for future innovations. Write the reduced innovations as π›œt=𝐂𝐳t\boldsymbol\epsilon_t=\mathbf C\mathbf z_t, with standardized orthogonal shocks Var(𝐳t)=𝐈\operatorname{Var}(\mathbf z_t)=\mathbf I and 𝐂𝐂′=𝚺\mathbf C\mathbf C'=\boldsymbol\Sigma. A stable levels VAR has reduced moving-average matrices 𝚽s\mathbf\Phi_s, with 𝚽0=𝐈\mathbf\Phi_0=\mathbf I. The identified standardized responses are 𝚯s=𝚽s𝐂\mathbf\Theta_s=\mathbf\Phi_s\mathbf C. In the Module 11 generator 𝐂=πβˆ’1𝛀1/2\mathbf C=\mathbf B^{-1}\boldsymbol\Omega^{1/2}, where the structural disturbances have diagonal covariance 𝛀\boldsymbol\Omega.

At forecast origin tt the observed history and deterministic forecast terms are known. Subtract the conditional forecast from 𝐘t+H\mathbf Y_{t+H}. Only innovations dated after tt remain:

𝐘t+Hβˆ’Et𝐘t+H=βˆ‘s=0Hβˆ’1𝚽sπ›œt+Hβˆ’s=βˆ‘s=0Hβˆ’1𝚯s𝐳t+Hβˆ’s. \mathbf Y_{t+H}-E_t\mathbf Y_{t+H} =\sum_{s=0}^{H-1}\mathbf\Phi_s\boldsymbol\epsilon_{t+H-s} =\sum_{s=0}^{H-1}\mathbf\Theta_s\mathbf z_{t+H-s}.

For H=2H=2, a shock arriving at t+1t+1 carries weight 𝚯1\mathbf\Theta_1 and a new shock at t+2t+2 carries weight 𝚯0\mathbf\Theta_0. Cross-date covariances vanish. Within a date, orthogonality removes the cross-shock covariance terms. Consequently the forecast-error covariance and the share for shock jj in target ii are

𝐕(H)=βˆ‘s=0Hβˆ’1𝚯s𝚯sβ€²=βˆ‘s=0Hβˆ’1𝚽s𝚺𝚽sβ€²,FEVDi←j(H)=βˆ‘s=0Hβˆ’1(𝚯s)ij2Vii(H),Vii(H)=βˆ‘k=1Kβˆ‘s=0Hβˆ’1(𝚯s)ik2. \begin{aligned} \mathbf V(H) &=\sum_{s=0}^{H-1}\mathbf\Theta_s\mathbf\Theta_s' =\sum_{s=0}^{H-1}\mathbf\Phi_s\boldsymbol\Sigma\mathbf\Phi_s',\\ \operatorname{FEVD}_{i\leftarrow j}(H) &=\frac{\displaystyle\sum_{s=0}^{H-1}(\mathbf\Theta_s)_{ij}^{\,2}} {\displaystyle V_{ii}(H)},\qquad V_{ii}(H)=\sum_{k=1}^{K}\sum_{s=0}^{H-1}(\mathbf\Theta_s)_{ik}^{\,2}. \end{aligned}

The shares sum to one across the KK shocks for any target with positive variance at a fixed horizon. Holding 𝚺\boldsymbol\Sigma and the reduced dynamics fixed leaves 𝐕(H)\mathbf V(H) unchanged under another admissible factorization. A rotation can change individual columns of 𝚯s\mathbf\Theta_s and their contributions. A correlated collection of raw reduced innovations need not yield this additive allocation.

The cumulative IRF sums signed weights for a single disturbance across response dates. Squaring that sum introduces cross-products, while the FEVD numerator sums squared weights for orthogonal surprises arriving on different dates. A shock scaled to one percentage point for a published IRF must be translated back to its stochastic variance scale before using the curve for a variance share. Plug-in FEVD tables hold estimates fixed. Sampling uncertainty about parameters and disagreement about identifying restrictions require additional analysis.

Deeper Dive β€” From levels lags to a VECM

Start from the reduced-form VAR(pp) with intercept 𝐀0\mathbf A_0 and subtract 𝐘tβˆ’1\mathbf Y_{t-1} from each side. For p=2p=2, replace 𝐘tβˆ’2\mathbf Y_{t-2} by 𝐘tβˆ’1βˆ’Ξ”π˜tβˆ’1\mathbf Y_{t-1}-\Delta\mathbf Y_{t-1}. This gives Ξ”π˜t=𝐀0+(𝐀1+𝐀2βˆ’πˆ)𝐘tβˆ’1βˆ’π€2Ξ”π˜tβˆ’1+π›œt. \Delta\mathbf Y_t=\mathbf A_0+ (\mathbf A_1+\mathbf A_2-\mathbf I)\mathbf Y_{t-1} -\mathbf A_2\Delta\mathbf Y_{t-1}+\boldsymbol\epsilon_t . Collecting terms for any pp gives Ξ”π˜t=𝐝t+𝚷𝐘tβˆ’1+βˆ‘j=1pβˆ’1πšͺjΞ”π˜tβˆ’j+π›œt,𝚷=βˆ‘i=1p𝐀iβˆ’πˆ,πšͺj=βˆ’βˆ‘i=j+1p𝐀i. \begin{aligned} \Delta\mathbf Y_t &=\mathbf d_t+\mathbf\Pi\mathbf Y_{t-1} +\sum_{j=1}^{p-1}\mathbf\Gamma_j\Delta\mathbf Y_{t-j} +\boldsymbol\epsilon_t,\\ \mathbf\Pi&=\sum_{i=1}^p\mathbf A_i-\mathbf I,\qquad \mathbf\Gamma_j=-\sum_{i=j+1}^p\mathbf A_i . \end{aligned} Here 𝐝t\mathbf d_t gathers the deterministic terms under the chosen specification. The πšͺj\mathbf\Gamma_j here are short-run reduced-form difference coefficients. Module 11 used a structural levels lag matrix in its simultaneous system. The VECM rearrangement itself is algebra. Cointegration is the restriction that 𝚷\mathbf\Pi has intermediate rank and that its long-run combinations are stationary under the maintained I(1) conditions.

At rank rr, write 𝚷=𝛂𝛃′\mathbf\Pi=\boldsymbol\alpha\boldsymbol\beta'. The rr columns of 𝛃\boldsymbol\beta span the cointegrating space. The KK rows of 𝛂\boldsymbol\alpha describe how each variable adjusts to its rr gaps. A constant restricted to the relationship enters with those same loadings. In the simple rank-one case, the gap could be ytβˆ’1βˆ’cβˆ’ΞΊxtβˆ’1y_{t-1}-c-\kappa x_{t-1} as in Module 10. Its scalar loading Ξ»\lambda becomes one row’s loading in the system. The bold 𝛂\boldsymbol\alpha denotes loadings here and 𝐀0\mathbf A_0 denotes an ordinary reduced-form intercept.

In the known system ordered Mouse, Harry, Karen, take 𝛃′=(1,βˆ’1,0)\boldsymbol\beta'=(1,-1,0) and 𝛂=(βˆ’0.1,0.1,0)β€²\boldsymbol\alpha=(-0.1,0.1,0)'. Their product maps yesterday’s locations into today’s expected changes. Harry’s row, Mouse’s column equals +0.1+0.1, which makes the predictive channel visible. The rank is one, leaving Kβˆ’r=2K-r=2 common stochastic trends under the regular I(1) representation. With only Mouse and Harry, there is one gap and one common trend. Multiplying a rank-one gap by βˆ’1-1 and its loadings by βˆ’1-1 leaves their product intact. At higher rank, changes of basis within the cointegrating space give multiple equivalent representations.

Two estimates of the same walkers’ gap

Engle–Granger supplies a simple two-step route. First estimate Mouse on Harry with a constant and verify the fitted residual using cointegration critical values. Then place yesterday’s fitted residual in both change equations beside the lagged changes. This lagged gap is constructed from the system’s own history. Johansen estimates the equilibrium space using the joint dynamics. Compare the normalizations before reading the loadings side by side.

Show R code
eg_walk <- eg_test(walk$Mouse, walk$Harry, p_adf = 4)
dMH <- diff(MH)
n_delta <- nrow(dMH)
t_index <- 2:n_delta
lag_gap <- eg_walk$residuals[t_index]
two_step <- lm(dMH[t_index, , drop = FALSE] ~ 0 + lag_gap +
               dMH[t_index - 1L, , drop = FALSE])
eg_levels <- coef(eg_walk$levels)
methods <- data.frame(
  Method = c("Generating", "Engle-Granger", "Johansen"),
  "Harry weight" = c(-1, -unname(eg_levels["x"]), gap_weights[2]),
  "Gap constant" = c(0, -unname(eg_levels["(Intercept)"]), gap_weights[3]),
  "Mouse loading" = c(-.1, coef(two_step)["lag_gap", "Mouse"], loadings[1]),
  "Harry loading" = c(.1, coef(two_step)["lag_gap", "Harry"], loadings[2]),
  check.names = FALSE)
knitr::kable(methods, digits = 3, row.names = FALSE,
  caption = "Same simulated sample. Each gap has unit weight on Mouse and each change equation includes the same lagged changes.")
Same simulated sample. Each gap has unit weight on Mouse and each change equation includes the same lagged changes.
Method Harry weight Gap constant Mouse loading Harry loading
Generating -1.000 0.000 -0.100 0.100
Engle-Granger -0.563 -1.206 -0.162 0.039
Johansen -0.934 -0.949 -0.153 0.072

The Engle–Granger residual statistic of βˆ’4.49 rejects no cointegration against the matching 5% critical value in this experiment. Its fitted long-run slope is about 0.563, compared with the Johansen estimate of 0.934 and the generating value of one. Finding evidence for a stable gap and estimating its weights precisely are separate accomplishments, especially with one finite realization of the common trend. Both fits imply that a positive gap slows Mouse and moves Harry forward, conditional on the lagged changes in that fit.

Technical Note β€” How the tests are constructed

Joint predictive exclusion

Write the predictor’s lag coefficients in the yy equation of a stationary VAR(pp) as (A1,yx,…,Ap,yx)(A_{1,yx},\ldots,A_{p,yx}). Its history adds no one-step linear predictive content conditional on the retained histories under H0:A1,yx=β‹―=Ap,yx=0.H_0:A_{1,yx}=\cdots=A_{p,yx}=0. On common rows, let RSSR\mathrm{RSS}_R and RSSU\mathrm{RSS}_U be the restricted and unrestricted residual sums of squares, qq the number of restrictions, nn the number of estimation rows and kUk_U the number of unrestricted coefficients including deterministic terms. The familiar statistic is F=(RSSRβˆ’RSSU)/qRSSU/(nβˆ’kU). F=\frac{(\mathrm{RSS}_R-\mathrm{RSS}_U)/q}{\mathrm{RSS}_U/(n-k_U)} . The reference calculation uses Fq,nβˆ’kUF_{q,n-k_U}. In a dynamic regression with lagged dependent variables, the justification is generally asymptotic under the relevant stability, innovation and variance assumptions. A larger system-wide claim can stack restrictions across several response equations using a Wald test and their joint covariance. Integrated levels can invalidate the routine reference distribution. Remaining innovation dependence, heteroskedasticity, misspecified lag dynamics, and specification searches can also affect nominal inference.

In a correctly specified VECM written with the gap at tβˆ’1t-1, full one-step exclusion of xx from the yy equation requires Ξ yx=0,Ξ“1,yx=β‹―=Ξ“pβˆ’1,yx=0. \Pi_{yx}=0,\qquad \Gamma_{1,yx}=\cdots=\Gamma_{p-1,yx}=0. These are restrictions on the levels and lagged-change channels. When r>1r>1, Ξ yx=βˆ‘β„“=1rΞ±yβ„“Ξ²xβ„“\Pi_{yx}=\sum_{\ell=1}^r\alpha_{y\ell}\beta_{x\ell}. A restriction on the whole loading row of yy asks whether yy adjusts to any gap. A restriction on Ξ yx\Pi_{yx} asks about the contribution of one named variable through the long-run space. The two questions can give different answers. Inference on long-run restrictions must respect estimation of the rank and cointegrating space.

Residual testing and Johansen statistics

With an intercept-only bivariate levels regression, define et=ytβˆ’cΜ‚βˆ’ΞΊΜ‚xte_t=y_t-\widehat c-\widehat\kappa x_t. The residual-ADF regression is Ξ”et=Ξ³etβˆ’1+βˆ‘j=1peψjΞ”etβˆ’j+vt. \Delta e_t=\gamma e_{t-1}+\sum_{j=1}^{p_e}\psi_j\Delta e_{t-j}+v_t . There is no extra intercept in this residual regression. Under no cointegration the fitted gap has a unit root. The test uses the tt-ratio for Ξ³Μ‚\widehat\gamma against a residual-based cointegration reference value that matches the number of variables and deterministic case. The course helper uses the bivariate, intercept-only, 5% MacKinnon calibration. The lag pep_e controls dependence in this auxiliary regression. It counts a different object from a Johansen levels lag order.

For Johansen, remove the allowed short-run dynamics and corresponding deterministic terms from the changes and lagged levels, with any restricted deterministic term included on the long-run side. The procedure measures how well combinations of lagged levels predict combinations of changes beyond those controls. Let Ξ»Μ‚1β‰₯β‹―β‰₯Ξ»Μ‚K\widehat\lambda_1\ge\cdots\ge\widehat\lambda_K be the ordered squared partial canonical correlations for the stochastic rank problem, using the appropriate deterministic specification. These are distinct from the companion roots used for stability checks. With TeT_e usable dynamic observations, the two statistics are Jtrace(r)=βˆ’Teβˆ‘j=r+1Klog(1βˆ’Ξ»Μ‚j),Jmax(r)=βˆ’Telog(1βˆ’Ξ»Μ‚r+1). \begin{aligned} J_{\mathrm{trace}}(r)&=-T_e\sum_{j=r+1}^{K}\log(1-\widehat\lambda_j),\\ J_{\mathrm{max}}(r)&=-T_e\log(1-\widehat\lambda_{r+1}). \end{aligned} The trace statistic tests rank at most rr against a higher rank. The maximum-eigenvalue statistic compares rank rr with rank r+1r+1. Each requires its own nonstandard critical values for the deterministic case. Larger statistics are evidence against the stated rank null. Rank selection is sensitive to small samples, breaks, lags, and drift. Economic knowledge can inform those choices before inspecting the results.

In ca.jo(), spec = "transitory" places the levels term at tβˆ’1t-1 as above. K = p supplies pp lags in levels and hence pβˆ’1p-1 lagged changes. type = "trace" requests the trace statistic and type = "eigen" the companion maximum-eigenvalue procedure. Use cajorls() after selecting an intermediate rank to recover normalized relations and adjustment equations. For a chosen recursive ordering, fevd(vec2var(...)) computes finite-horizon shares for the level targets. For example, with Mouse first, the second recursively identified shock accounts for about 5.7% of the four-step forecast-error variance of Mouse’s location in our fitted rank-one system.

Show R code
walk_fevd <- fevd(walk_levels, n.ahead = 4)$Mouse
stopifnot(abs(walk_fevd[4, "Harry"] - .0569721) < 1e-6,
          identical(walk_rank$Trace > walk_rank$Critical_5, c(TRUE, FALSE)),
          identical(as.integer(results[, "Rank"]), c(0L, 0L, 0L, 1L)),
          all(adf_changes["statistic", ] < adf_changes["critical_5", ]),
          abs(total_ca[2] - .1804651) < 1e-6,
          abs(directions$F[1] - 6.24236) < 1e-4,
          abs(truth$Share_x[4] - .3021) < .0001)

Read alongside the textbooks

  • Enders, Applied Econometric Time Series, fourth edition. Chapter 5 Β§7, pp.Β 301–302, develops variance shares from successive forecast errors. Section 8, pp.Β 305–307, develops directional lag exclusion. Chapter 6 Β§Β§3–4, pp.Β 353–363, connects adjustment in an interest-rate system to residual-based testing. Sections 7–9, especially pp.Β 373–385 and 389–393, develop rank, normalization, and a sequential rank decision.
  • Hamilton, Time Series Analysis. Sections 11.2–11.3, pp.Β 302–312, distinguish directional prediction and block tests. Section 11.5, pp.Β 323–324, gives the forecast-error covariance decomposition. Section 19.1, especially pp.Β 580–582, interprets the error-correction form. Sections 20.2–20.3, pp.Β 635–650, develop the reduced-rank estimation and tests.
  • R documentation. The model class, target, ordering, and horizon determine what a function returns. Variance decomposition Β· Johansen VECM fit Β· Converting a fitted VECM to its levels representation