{
const widget = makeVarIRF({id: "m12-paths-slide", view: "paths"});
invalidation.then(() => widget.destroy());
return widget;
}Module 12 · Impulse responses are differences from a baseline
Econ 6376 · The George Washington University
varIRFModel = {
const A0 = [2 / 7, 6 / 35];
const A1 = [[2 / 5, 8 / 35], [1 / 5, 16 / 35]];
const Sigma = [[80 / 49, 48 / 49], [48 / 49, 68 / 49]];
const mean = [34 / 49, 4 / 7];
// Columns always name y-associated and x-associated shocks, even when x is first.
const factors = {
truth: [[8 / 7, 4 / 7], [2 / 7, 8 / 7]],
y: [[Math.sqrt(80) / 7, 0], [48 / (7 * Math.sqrt(80)), Math.sqrt(4 / 5)]],
x: [[4 / Math.sqrt(17), 24 / (7 * Math.sqrt(17))], [0, 2 * Math.sqrt(17) / 7]]
};
const response = (structure, source, size = 1) => {
const C = factors[structure];
const values = [[C[0][source] * size, C[1][source] * size]];
for (let h = 1; h <= 20; h++) {
const previous = values[h - 1];
values.push(A1.map(row => row[0] * previous[0] + row[1] * previous[1]));
}
return values;
};
return {A0, A1, Sigma, mean, factors, response, horizon: 20};
}makeVarIRF = (options = {}) => {
const model = varIRFModel;
const identification = options.view === "identification";
const root = document.createElement("div");
root.className = "m12-irf";
if (options.id) root.id = options.id;
const names = ["y", "x"];
const labels = {y: "y first", x: "x first", truth: "Known generating structure"};
const colors = {y: "#146b91", x: "#a3471e", truth: "#6b3d85"};
let source = 1, receiver = 0, size = 1, horizon = 0, order = "y", truthVisible = false;
root.innerHTML = `<style>
.m12-irf{font:16px/1.45 system-ui,sans-serif;color:#17354b;background:#fff;border:1px solid #bdcdd8;border-radius:10px;padding:1rem;margin:1rem 0;max-width:1050px;box-sizing:border-box}
.m12-irf *{box-sizing:border-box}.m12-irf [hidden]{display:none!important}
.m12-irf .m12-controls{display:flex;gap:.65rem 1rem;align-items:end;flex-wrap:wrap;margin:.65rem 0}
.m12-irf label{display:flex;flex-direction:column;gap:.2rem;font-size:.9rem;font-weight:600}
.m12-irf button,.m12-irf select{font:inherit;color:inherit;background:#fff;border:1px solid #8da5b6;border-radius:5px;padding:.4rem .65rem;min-height:40px}
.m12-irf button{cursor:pointer}.m12-irf button:disabled{opacity:.55;cursor:default}
.m12-irf button[aria-pressed=true]{color:#fff;background:#173f59}
.m12-irf button:focus-visible,.m12-irf select:focus-visible{outline:3px solid #d68b21;outline-offset:3px}
.m12-irf p{font-size:1rem;margin:.5rem 0}.m12-irf .m12-caption{font-size:.9rem;color:#415d70}
.m12-irf .m12-status{padding:.6rem .8rem;background:#eef5f9;border-left:4px solid #146b91}
.m12-irf .m12-plot{width:100%;height:auto;display:block}
.m12-irf .m12-legend{display:flex;flex-wrap:wrap;gap:.3rem 1.2rem;font-size:.9rem;margin:.2rem 0 .5rem}
.m12-irf .m12-swatch{display:inline-block;width:1.6rem;vertical-align:middle;margin-right:.4rem;border-top:3px solid}
.m12-irf .m12-impact{display:flex;gap:.7rem 1.5rem;flex-wrap:wrap;align-items:center;padding:.6rem .8rem;border:1px solid #d6e1e8;border-radius:6px;margin:.7rem 0}
.m12-irf .m12-matrix{display:grid;grid-template-columns:repeat(2,4rem);gap:.2rem .6rem;text-align:right;padding:.2rem .6rem;border-left:2px solid;border-right:2px solid;font-variant-numeric:tabular-nums}
.m12-irf .m12-selected{font-weight:750;color:#146b91}.m12-irf .m12-value{font-variant-numeric:tabular-nums}
@media(max-width:550px){.m12-irf{padding:.65rem}.m12-irf .m12-controls{gap:.5rem}.m12-irf button,.m12-irf select{padding:.35rem .5rem}}
</style>
<p><strong>${identification ? "Keep the reduced system; change the identifying restriction" : "One changed shock, two system paths"}</strong></p>
<div class="m12-controls">
<label>Shock associated with<select data-control="source"><option value="0">y equation</option><option value="1" selected>x equation</option></select></label>
<label>Receiving variable<select data-control="receiver"><option value="0">y</option><option value="1">x</option></select></label>
<label>Shock size<select data-control="size"><option value="-1">−1 shock SD</option><option value="1" selected>+1 shock SD</option><option value="2">+2 shock SD</option></select></label>
</div>
<div class="m12-controls" data-identification ${identification ? "" : "hidden"} role="group" aria-label="Identifying restriction">
<button type="button" data-order="y">Assume y first</button>
<button type="button" data-order="x">Assume x first</button>
<button type="button" data-action="truth">Reveal truth and compare</button>
</div>
<p data-assumption></p>
<div class="m12-impact" data-impact></div>
<div class="m12-controls" role="group" aria-label="Inspect response horizons">
<button type="button" data-action="step">Step +1</button>
<button type="button" data-action="all">Show all horizons</button>
<button type="button" data-action="reset">Reset</button>
<span class="m12-value" data-horizon></span>
</div>
<div data-figures></div>
<p class="m12-status" aria-live="polite" data-status></p>
<p class="m12-caption" data-caption></p>`;
const field = name => root.querySelector(`[data-${name}]`);
const number = value => Math.abs(value) < 0.00005 ? "0.000" : value.toFixed(3);
const maxResponse = [0, 1].map(r => Math.max(...Object.keys(model.factors).flatMap(k => [0, 1].flatMap(j => model.response(k, j).map(row => Math.abs(row[r]))))));
const legend = (text, color, dash = false) => `<span><span class="m12-swatch" style="border-color:${color};${dash ? "border-top-style:dashed" : ""}"></span>${text}</span>`;
function plot(title, series, center, extent) {
const width = 820, height = 230, left = 65, right = 20, top = 37, bottom = 43;
const x = h => left + h / model.horizon * (width - left - right);
const y = value => top + (center + extent - value) / (2 * extent) * (height - top - bottom);
let content = `<text x="${left}" y="20" font-size="16" font-weight="650">${title}</text>`;
for (let t = -2; t <= 2; t++) {
const value = center + t * extent / 2;
content += `<line x1="${left}" y1="${y(value)}" x2="${width - right}" y2="${y(value)}" stroke="#dbe4ea"/><text x="${left - 10}" y="${y(value) + 5}" text-anchor="end" font-size="13">${number(value)}</text>`;
}
for (const h of [0, 5, 10, 15, 20]) content += `<text x="${x(h)}" y="${height - bottom + 22}" text-anchor="middle" font-size="13">${h}</text>`;
content += `<text x="${(width + left - right) / 2}" y="${height - 3}" text-anchor="middle" font-size="13">Horizon h (periods); 0 = impact</text>`;
if (center - extent <= 0 && center + extent >= 0) content += `<line x1="${left}" y1="${y(0)}" x2="${width - right}" y2="${y(0)}" stroke="#708593" stroke-dasharray="3 3"/>`;
content += `<line x1="${x(horizon)}" y1="${top}" x2="${x(horizon)}" y2="${height - bottom}" stroke="#708593" stroke-dasharray="2 4"/>`;
for (const line of series) {
const values = line.full ? line.values : line.values.slice(0, horizon + 1);
const points = values.map((value, h) => `${x(h)},${y(value)}`).join(" ");
content += `<polyline points="${points}" fill="none" stroke="${line.color}" stroke-width="${line.width || 2.8}" ${line.dash ? 'stroke-dasharray="7 5"' : ""}/>`;
content += `<circle cx="${x(horizon)}" cy="${y(line.values[horizon])}" r="4" fill="${line.color}"/>`;
}
return `<svg class="m12-plot" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${width} ${height}" role="img" aria-label="${title}. Values at the inspected horizon are given below.">${content}</svg>`;
}
function draw() {
const structure = identification ? order : "truth";
const responses = Object.fromEntries(Object.keys(model.factors).map(k => [k, model.response(k, source, size)]));
const response = responses[structure].map(row => row[receiver]);
const baseline = Array(model.horizon + 1).fill(model.mean[receiver]);
const shocked = baseline.map((value, h) => value + response[h]);
const extent = maxResponse[receiver] * 2.2;
const C = model.factors[structure];
root.querySelectorAll("[data-order]").forEach(button => button.setAttribute("aria-pressed", String(order === button.dataset.order)));
field("horizon").textContent = `Inspecting h = ${horizon}${horizon === 0 ? " (impact)" : ""}`;
root.querySelector('[data-action="step"]').disabled = horizon === model.horizon;
root.querySelector('[data-action="all"]').disabled = horizon === model.horizon;
root.querySelector('[data-action="truth"]').textContent = truthVisible ? "Hide truth comparison" : "Reveal truth and compare";
root.querySelector('[data-action="truth"]').setAttribute("aria-pressed", String(truthVisible));
field("assumption").innerHTML = identification
? order === "y" ? "<strong>y first:</strong> exclude the current x → y connection (b<sub>yx</sub> = 0). y may affect x within the period."
: "<strong>x first:</strong> exclude the current y → x connection (b<sub>xy</sub> = 0). x may affect y within the period."
: "<strong>Known generating system:</strong> both current connections are present. One shock changes; the initial history and all later innovations are identical across paths.";
field("impact").innerHTML = `<div><strong>${identification ? "Impact map C" : "Impact map B⁻¹"}</strong><br><span class="m12-caption">${identification ? "ε = C × standardized shocks" : "ε = B⁻¹η; each η has variance 1"}<br>Rows: y, x · Columns: y-shock, x-shock</span></div><div class="m12-matrix">${C.flatMap(row => row.map((value, j) => `<span class="${j === source ? "m12-selected" : ""}">${number(value)}</span>`)).join("")}</div><div class="m12-caption">Selected column × ${size > 0 ? "+" : ""}${size} shock SD<br>Response at h = 0: (${number(C[0][source] * size)}, ${number(C[1][source] * size)})′</div>`;
if (!identification) {
field("figures").innerHTML = `<div class="m12-legend">${legend("Baseline", "#708593", true)}${legend("After one added shock", "#146b91")}</div>${plot(`${names[receiver]} level: the two paths`, [{values: baseline, color: "#708593", dash: true, full: true}, {values: shocked, color: "#146b91"}], model.mean[receiver], extent)}<div class="m12-legend">${legend("Shocked − baseline = IRF", "#a3471e")}</div>${plot(`${names[receiver]} response: the path difference`, [{values: response, color: "#a3471e"}], 0, extent)}`;
field("status").textContent = `At h = ${horizon}: baseline ${number(baseline[horizon])}; shocked ${number(shocked[horizon])}; difference ${number(response[horizon])} ${names[receiver]}-units.`;
field("caption").textContent = "The baseline starts at the system mean and future innovations are zero in this display. It stays fixed. The same path-difference calculation works with identical nonzero future innovations. Axes stay fixed across the available controls.";
} else {
const visible = truthVisible ? ["y", "x", "truth"] : [order];
field("figures").innerHTML = `<div class="m12-legend">${visible.map(k => legend(labels[k], colors[k], k === "x")).join("")}</div>${plot(`${names[receiver]} response to the ${names[source]}-associated shock`, visible.map(k => ({values: responses[k].map(row => row[receiver]), color: colors[k], dash: k === "x"})), 0, extent)}`;
field("status").textContent = visible.map(k => `${labels[k]}: ${number(responses[k][horizon][receiver])}`).join("; ") + ` ${names[receiver]}-units at h = ${horizon}.`;
field("caption").textContent = `Reduced coefficients, innovation covariance and the baseline stay fixed. Each curve uses ${size > 0 ? "+" : ""}${size} standard deviation(s) of its own model-specific shock; the shocks are not interchangeable interventions. ${truthVisible ? "Both recursive zero restrictions are false for the known simultaneous generator. Its truth is supplied by the simulation, not recovered from the data." : "Compare the two assumptions before revealing the instructor-known generating structure."}`;
}
root.value = {view: identification ? "identification" : "paths", source, receiver, size, horizon, order, truthVisible,
baseline: [...baseline], shocked: [...shocked], response: [...response], responses,
impact: C.map(row => [...row]), reduced: {A0: [...model.A0], A1: model.A1.map(row => [...row]), Sigma: model.Sigma.map(row => [...row])}};
root.dispatchEvent(new Event("input", {bubbles: true}));
}
const click = event => {
const button = event.target.closest("button");
if (!button || !root.contains(button) || button.disabled) return;
if (button.dataset.order) order = button.dataset.order;
if (button.dataset.action === "truth") truthVisible = !truthVisible;
if (button.dataset.action === "step") horizon = Math.min(horizon + 1, model.horizon);
if (button.dataset.action === "all") horizon = model.horizon;
if (button.dataset.action === "reset") {
source = 1; receiver = 0; size = 1; horizon = 0; order = "y"; truthVisible = false;
root.querySelector('[data-control="source"]').value = "1";
root.querySelector('[data-control="receiver"]').value = "0";
root.querySelector('[data-control="size"]').value = "1";
}
draw();
};
const change = event => {
if (event.target.dataset.control === "source") source = Number(event.target.value);
if (event.target.dataset.control === "receiver") receiver = Number(event.target.value);
if (event.target.dataset.control === "size") size = Number(event.target.value);
draw();
};
const keydown = event => {
if (event.target.closest("button,select") && ["Enter", " ", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) event.stopPropagation();
};
root.addEventListener("click", click);
root.addEventListener("change", change);
root.addEventListener("keydown", keydown);
root.destroy = () => {root.removeEventListener("click", click); root.removeEventListener("change", change); root.removeEventListener("keydown", keydown);};
draw();
return root;
}What changes relative to the path we would otherwise have seen?
| Mixing-board channel | Module 12 |
|---|---|
| Own and cross-variable memory | Keep the VAR dynamics |
| Current connections | State the shock’s identification |
| New question | Trace one extra shock through the system |
| Direct structural cross-lag | Reduced-form cross-lag |
|---|---|
| in the equation: 0 | in the equation: 8/35 |
The second coefficient combines connections in the system.
| Before | At | After |
|---|---|---|
| Same history | Add one specified shock to one copy | Same subsequent innovations |
The other copy is the baseline: what happens without that extra shock.
Suppose the IRF of the funds rate is +0.5 percentage point.
| Baseline rate | IRF | Rate with the extra shock |
|---|---|---|
| 2.0% | +0.5 pp | 2.5% |
| 4.0% | +0.5 pp | 4.5% |
At the system mean, with zero later innovations, our baseline is flat.
With a different history or common later innovations, it can move.
Yes—if it rises less than the baseline would have risen.
Where does the response come from when there is no new pulse?
Add one unit to , holding the other disturbance fixed.
| Horizon h | y deviation | x deviation |
|---|---|---|
| 0 | 0.5714 | 1.1429 |
| 1 | 0.4898 | 0.6367 |
| 2 | 0.3415 | 0.3890 |
For standardized structural shocks:
Column of gives the response to one structural-shock SD.
A curve needs a shock, a scale, a clock—and a baseline interpretation.
| Shock label | What is fixed? |
|---|---|
| One unit | The disturbance’s numerical increment |
| One shock SD | Its scale under the stated identification |
| −100 bp policy impact | A rate decrease of one percentage point |
| Modeled variable | Its point IRF | Its cumulative IRF |
|---|---|---|
| Level | Level-unit deviation | Sum of level-unit deviations |
| Difference | Difference in changes | Level deviation, if initial levels match |
| Log difference | Difference in log growth | Log-level deviation |
Reverse the sign. Double the deviation at every horizon.
The shocked and baseline paths converge toward one another.
The observed series may keep moving as other shocks arrive.
Can the same reduced system support different response stories?
| Assumption | Excluded current connection | Generating coefficient |
|---|---|---|
| first | 0.50 | |
| first | 0.25 |
Both still reproduce the same reduced-form information.
ortho asks R to compute| Option | Impact experiment | Propagation |
|---|---|---|
ortho = FALSE |
One-unit reduced innovation; other coordinates zero | |
ortho = TRUE |
One-SD recursive shock, in the fitted order |
SVAR() object already carries its impact map.
ortho = FALSE is not a generalized IRF. Optional notes explain that separate object.
How much of this apparent response is precisely estimated?
At each horizon, compare the responses across replications.
Sample residuals as whole vectors across equations.
At a specified horizon: interpret its interval under the procedure.
Across the whole path: simultaneous coverage needs a different construction.
The chosen variables, lag specification and identifying assumptions remain part of the claim.
What does a policy easing do to credit creation and destruction?
Some firms expand debt while others contract it.
The net change can conceal both movements.
| Object | Meaning |
|---|---|
| Credit creation | Debt-weighted positive firm debt growth |
| Credit destruction | Debt-weighted absolute negative firm debt growth |
| Macro controls | GDP, unemployment, consumer prices |
| Policy rate | Effective funds rate; Wu–Xia substitute at the lower bound |
The first lag of the policy rate is excluded from the price equation.
The restricted system is estimated by iterated SUR.
ortho = TRUE does not reproduce the full specification.
| Feature | Figure 4 |
|---|---|
| Shock | One-time unexpected −100 bp policy easing |
| Clock | Quarters; 0 = impact |
| Dynamics | Two lags, selected by BIC |
| Bands | 68%, mean-bias-corrected residual wild bootstrap |
Published GDP and unemployment IRFs. Original axes and bands retained.
Published consumer-price and monetary-policy-rate IRFs, with their original scaling.
Published credit-destruction and credit-creation IRFs.
Credit creation: −0.11 pp at impact → positive by Q6 → about +0.15 pp at Q8.
Under [identifying restrictions], a [size and sign] shock produces a [receiving variable] deviation from baseline of [magnitude and units] at [horizon], with [uncertainty].
Specify the shock. Trace its propagation. Report the units, assumptions and uncertainty.
The curve alone does not tell you the baseline or actual level.