tidyMacro tidyMacro
  • Home
  • Replications
    • Bloom (2009) — Uncertainty Shocks
    • Galí (1999) — Technology Shocks
    • Beaudry & Portier (2014) — News Shocks
    • Kaenzig (2021) — Oil Supply News
    • Forni, Gambetti & Ricco (2022) — Non-Invertible Shocks

tidyMacro

High-Performance Vector Autoregression in R

Author
Affiliation

Muhsin Ciftci

Goethe University Frankfurt

Published

April 26, 2026

tidyMacro is an R package for fast estimation of Vector Autoregression (VAR) models via C++ (Rcpp/RcppArmadillo).

TipFunctionality
  • Fast VAR & VARX reduced form estimations
  • Zero dependency on other packages. Ground up written in C++. All visualizations made with ggplot2 in R.
  • Publication-ready plots out of the box. Each plot is a ggplot2 object, can be ex post customized
  • The package comes with a proper theme: set_tidyMacro_theme()
  • Parallel bootstrap computations via OpenMP for maximum speed. You can avoid parallel computations using n_threads = 1. Without using this option, n-1 cores will be used for parallel computations, where n is the number of cores in your Mac/PC.
    • If you encounter a problem when Rstudio/Positron kicks you out, you may use this option.
  • Excellent documentation with detailed examples for every function
  • Import data via tidyverse, clean, modify and then supply your final data piping as.matrix() for Armadillo calculations
  • Example data sets for each replication: Already transformed data
ImportantModels - Identification - Decompositions
  1. Identification via short-run / recursive ordering ✅
    • Impulse response functions ✅
      • Residual based bootstraps
      • Wild bootstraps
    • Bias corrected impulse Response functions ✅
    • Variance Decomposition ✅
    • Historical Decomposition ✅
    • Replication: Bloom (2009)
  2. Identification via long run restrictions
    • Impulse response functions ✅
    • Bias corrected impulse Response functions ✅
    • Variance Decomposition ✅
    • Replication 1: Galí (1999)
    • Replication 2: Beaudry and Portier (2014)
  3. Identification via external instruments (Proxy-SVAR) ✅
    • Impulse Response functions ✅
      • Moving block bootstraps
    • Forecast error variance Decomposition ✅
    • Historical Decomposition ✅
    • First Stage F-stats ✅
    • Recovering the shock series ✅
      • Unit normalization
      • One SD normalization
    • Weak IV Robust IRF ✅
      • Delta method
      • Anderson-Rubin
    • Replication: Känzig (2021)
    • External instrument SVAR analysis for noninvertible shocks following Forni et al. (2022) ✅
      • Invertibility test ✅
      • Recoverability test ✅
      • Calculate IRF, HD, FEVD and relative IRF if none. ✅
      • Replication: Forni et al. (2022) using a small VAR using Gertler and Karadi (2015) instrument and data
  4. Identification via Internal instruments ✅
    • Adding instrument to VAR as the first variable, then IRF identified recursively
    • Other options in short run / recursive identification apply here
    • Replication: Känzig (2021)
  5. Identification via Heteroskedasticity following Rigobon (2003) ✅
    • Impulse Response functions ✅
    • Replication: Känzig (2021)
  6. Identification via Sign, Narrative and Zero Restrictions ⛔
  7. Identification via Non-Gaussianity ⛔
  8. Local Projections ⛔
    • Local projections with Exogenous Shocks
    • Local projections IV
    • Panel Local projections
    • State Dependent Local projections
    • Bayesian Local projections
Back to top

References

Beaudry, Paul, and Franck Portier. 2014. “News-Driven Business Cycles: Insights and Challenges.” Journal of Economic Literature 52 (4): 993–1074. https://doi.org/10.1257/jel.52.4.993.
Bloom, Nicholas. 2009. “The Impact of Uncertainty Shocks.” Econometrica 77 (3): 623–85. https://doi.org/10.3982/ECTA6248.
Forni, Mario, Luca Gambetti, and Giovanni Ricco. 2022. External Instrument SVAR Analysis for Noninvertible Shocks. https://warwick.ac.uk/fac/soc/economics/research/workingpapers/2022/twerp_1444_-_ricco.pdf.
Galí, Jordi. 1999. “Technology, Employment, and the Business Cycle: Do Technology Shocks Explain Aggregate Fluctuations?” American Economic Review 89 (1): 249–71. https://doi.org/10.1257/aer.89.1.249.
Gertler, Mark, and Peter Karadi. 2015. “Monetary Policy Surprises, Credit Costs, and Economic Activity.” American Economic Journal: Macroeconomics 7 (1): 44–76. https://doi.org/10.1257/mac.20130329.
Känzig, Diego R. 2021. “The Macroeconomic Effects of Oil Supply News: Evidence from OPEC Announcements.” American Economic Review 111 (4): 1092–125. https://doi.org/10.1257/aer.20190964.
Rigobon, Roberto. 2003. “Identification Through Heteroskedasticity.” The Review of Economics and Statistics 85 (4): 777–92. https://doi.org/10.1162/003465303772815727.

Built with Quarto

© 2025 Muhsin Ciftci · Goethe University Frankfurt

tidyMacro