LocalProjections.jl
Local projection impulse responses and multipliers in Julia, with a formula interface
These pages work through the package’s examples in full. Every number, table and figure is computed from the package when the site is rendered, so the text cannot drift from the code.
Ramey–Zubairy (2018)
Government spending multipliers on US data from 1889. Impulse responses, the one-step and two-step cumulative multipliers, the published numbers, and the weak-instrument diagnostic.
two-year multiplier: news 0.67 · Blanchard–Perotti 0.41
Piger–Stockwell (2025)
Local projections in levels or in long differences? Responses of industrial production and prices to monetary-policy shocks, 1990–2019, estimated both ways with ldiff.
industrial production after 36 months: long differences -0.33 · levels 0.09
Install
using Pkg
Pkg.add(url = "https://github.com/andrerecio/LocalProjections.jl")This is a fork of Giuseppe Ragusa’s LocalProjections.jl. It adds HAR inference with equal-weighted-cosine (EWC) variances and Student-\(t\) critical values, the Herbst–Johannsen bias correction, the VAR moving-block bootstrap, VAR lag selection, state-dependent projections, long-difference projections, and the Hall–Barro–Redlick transformation for fiscal multipliers.
The workflow in a few lines
using LocalProjections, StatsModels, CovarianceMatrices, Plots
r = lp(@formula(leads(y) ~ shock + lags(y, 4) + lags(shock, 4)), df; horizon = 20)
summarize(r, Bartlett{NeweyWest}(); level = 0.90) # path, s.e. and bands
plot(r, EWC(ewc_bandwidth(r)); levels = [0.68, 0.90])The left-hand side sets the response: leads(y) for \(y_{t+h}\), cumul(y) for \(\sum_{j \le h} y_{t+j}\), anchor(y, z) for \(y_{t+h} - z_t\), ldiff(y) for \(y_{t+h} - y_{t-1}\), hbr(x, y) for \((x_{t+h} - x_{t-1}) / y_{t-1}\). lpiv takes an instrumented regressor, (cumul(g) ~ z), and the covariance estimator is any estimator from CovarianceMatrices.jl.
Rebuilding these pages
From docs/quarto/:
julia --project=. -e 'using Pkg; Pkg.instantiate()'
quarto renderComputed results are frozen in _freeze/, so a page is re-run only when its source changes. A change to the package itself does not invalidate them: re-render a page explicitly (quarto render ramey-zubairy.qmd always executes) or delete _freeze/. This build: LocalProjections at commit 84b96ee, Julia 1.12.6.