MATLAB code for inference on impulse responses using Local Projections or VARs.
Reference: Montiel Olea, José Luis, Mikkel Plagborg-Møller, Eric Qian and Christian K. Wolf (2024), "Double Robustness of Local Projections and Some Unpleasant VARithmetic"
Tested in: MATLAB R2023b on Macbook Pro 2023 (M3 Pro)
documents: Paper and supplement
- lp_varithmetic.pdf: Main paper
- lp_varithmetic_supplement.pdf: Online supplement
analytics: Figures for analytical results
- plot_arbias.m: Plot the least-favorable MA polynomial for the local-to-AR(1) model
- plot_worstcase.m: Generate the various analytical worst-case figures
emp_ses: Compute empirical standard error ratios based on Ramey (2016)
- run_ramey_ses.m: Compute LP and VAR SEs
- plot_ramey_ses.m: Generate supplementary figure that shows standard error ratios by horizon
estimation: Functions for LP and VAR estimation and inference
- ir_estim.m: Main function for estimates and confidence intervals
simulations: Simulation studies
- arma: Map ARMA into local-to-AR representation (get_arma.m, report_arma.m) + run simulations (run_arma.m) + generate figures (figures_arma.m)
- sw: Map Smets-Wouters model into local-to-VAR representation (get_varma_sw.m, report_varma_sw.m) + run simulations (run_varma_sw.m) + generate figures (figures_varma_sw.m), for three different variable selections and identification schemes
- auxiliary_functions: Auxiliary simulation-specific routines
- Figures 4.1-4.5 and A.2-A.3. First run the file run_ramey_ses.m. Then execute plot_worstcase.m.
- Table 5.1. Run the file report_varma_sw.m. The shock identification scheme needs to be set to "lshock".
- Figures 5.1 and D.4. Execute run_varma_sw.m and then run figures_varma_sw.m. The shock identification scheme needs to be set to "lshock", the option "boot" in the various specifications needs to be set to "true", and the relevant DGP type needs to be selected in the figures file.
- Figure A.1. Run the file plot_arbias.m.
- Table D.1 and Figure D.1. Run the file report_arma.m.
- Figure D.2. Execute run_arma.m and then run figures_arma.m. The option "boot" needs to be set to "true", and the relevant DGP type needs to be selected in the figures file.
- Figure D.3. Execute run_varma_sw.m and then run figures_varma_sw.m. The shock identification scheme needs to be set to "mpshock", the option "boot" in the various specifications needs to be set to "true", and the relevant DGP type needs to be selected in the figures file.
Our estimation routines build on the replication materials for Montiel-Olea and Plagborg-Møller (2021).
Plagborg-Møller acknowledges that this material is based upon work supported by the NSF under Grant #2238049, and Wolf does the same for Grant #2314736.