Estimation and identification of structural vector
autoregressions and local projections, with a compiled 'C++' backend.
Shocks can be identified by short-run (recursive) restrictions, long-run
restrictions following Blanchard and Quah (1989)
< https://www.jstor.org/stable/1827924>, maximum forecast error variance
share following Uhlig (2005)
Welcome! Full documentation and function references are available at https://tidymacro.netlify.app. For a comprehensive overview of the package's functionality and replication examples, a separate replication gallery is provided on the main webpage of the package.
# install.packages("devtools")
devtools::install_github("muhsinciftci/tidyMacro")
tidyMacro is developed with AI coding agents, under significant human review, and every method is checked against the original studies.
The code is written mainly with Claude (Claude Code). Codex independently cross-checks the work. Each agent has a narrow role:
| Agent | Role |
|---|---|
| C++ engineer | Implements and refactors the RcppArmadillo routines |
| Numerical-methods reviewer | Checks the econometrics and numerics of VAR, SVAR, IV, sign restriction, bootstrap and local projection code |
| R interface reviewer | Checks the R wrappers, plots and exported functions |
| Check runner | Compiles the package and runs the tests and diagnostics |
The reviewer and check-runner agents cannot edit the code. When the agents disagree, the code and the reference output settle it, not either model.
The author designs and reviews every function, one at a time. That covers inputs, outputs, defaults, speed and memory use. AI errors found during development are corrected by hand. Where tidyMacro deliberately differs from an original implementation, the documentation says so.
| Method | Replicated study |
|---|---|
| Short-run (recursive) restrictions | Bloom (2009) |
| Long-run and mixed restrictions | Galí (1999); Beaudry and Portier (2014) |
| External instruments (proxy SVAR) | Känzig (2021) |
| Noninvertible shocks | Forni, Gambetti and Ricco (2022), using the Gertler and Karadi (2015) instrument |
| Internal instruments; heteroskedasticity | Känzig (2021) |
| Sign, narrative and sign + IV restrictions | Uhlig (2005); Antolín-Díaz and Rubio-Ramírez (2018); Arias, Caldara and Rubio-Ramírez (2019); Cesa-Bianchi and Sokol (2022) |
| Local projections and LP-IV | Jordà and Taylor (2025) |
| State-dependent local projections | Tenreyro and Thwaites (2016) |
| Panel local projections | Mian, Sufi and Verner (2017) |
| LP difference-in-differences | Dube, Girardi, Jordà and Taylor (2025) |