tidyMacro: A Fast, Tidy Toolkit for Applied Macroeconometrics
Ongoing Work
Abstract
tidyMacro is an R package that provides a fast,unified toolkit for applied macroeconometric analysis. It supports reduced-form VAR estimation, together with a comprehensive set of structural identification schemes: recursive (short-run), long-run, external instruments (proxy-SVAR) for both invertible and non-invertible shocks, internal instruments and heteroskedasticity-based identification. Inference is delivered through several bootstrap routines: The package further provides forecast error variance decompositions, historical decompositions, and formal diagnostics for external-instrument validity. Four local projections (LP) estimators are exposed under a common formula grammar: classical LP-OLS, LP with instrumental variables (LP-IV), panel LP with time-clustered inference and optional small-sample refinement, and LP difference in differences. The computational engine is written in C++ via Rcpp and RcppArmadillo, with OpenMP parallelism across bootstrap replications and horizons, while the R layer follows tidyverse conventions and returns tidy tibbles and ggplot2 objects. Replication datasets ship with the package so that canonical empirical applications can be reproduced end-to-end.