Replication files for "Heterogeneity in Euro Area Monetary Policy Transmission: Results from a Large Multi-Country BVAR Model"

Required subdirectories: output (for output), functions (contains subfunctions), data (contains data files)
Results can differ slightly because of the random draws.

"BVAR_JMCB_noR10.csv" contains the data for the VAR analysis. "Data.csv" contains the data on the countries' structural characteristics in Table 2.

To follow the analysis in the paper, run the following MATLAB files in the indicated order:


Step 1)
run: BVAR_main_1999_2014

Code loads and transforms data and estimates reducted-form VAR

Parameter estimates for further analyses are stored in file "estimates" which contains the structure "res". "res.mcmc.beta", "res.mcmc.sigma" and the wider interval of save steps in .beta2 to .beta4 and .sigma2 to .sigma4
contain the Beta and Sigma matrices for the different savestep intervals. The other codes will use the savefile "estimates_500" which contains the savestep 500 estimates. 

Creates convergence diagnostics (Figure A1 and A2). Note that results can differ slightly from those in paper because of the random number generator.


Step 2)
run: SR_ident_base_gen_moreSR: loads estimates500

Identification through sign restrictions. Creates IRF to 25bp normalized shock  (set "shocksize = [0.0025]").

Important: the analyses in steps 3 to 5 and of the output loss of price level reduction require that "shocksize" is not empty, i.e. that
monetary policy shocks are scaled to a common level.



Step 3)
run: BVAR_IRFs_diff_all: requires output from SR_ident_base_gen_moreSR

Graphs distributions in differences of IRFs (Figures 1 to 5)


Step 4)
run: IRF_Heterogeneity_KS: requires output from SR_ident_base_gen_moreSR

Performs Kolmogorov-Smirnov test and distance measures for comparing IRFs across countries; see code for explanation of output file.


Step 5)

run: IRF_Heterogeneity_median: requires output from SR_ident_base_gen_moreSR

Tests for identity of median of impulse response distributions across countries; see code for explanation of output file.


Additonal codes:

BVAR_plot_hyperparameters: needs as input file "estimates.mat", not estimates_500.mat"
Plots prior and posterior of hyperparameters from res.mcmc.lambda, res.mcmc.theta etc. (Figure B1 in online appendix)

BVAR_sacrifice_ratio: nees as input "imprespdrawstoreSR.mat" which is created in step 2 above.
Generates plot of distribution of output cost of price level reduction (Figures D1 to D3 in the online appendix)

BVAR_imprespgen_SR_plot_100: needs as input files from step 2 above.
Creates plots of impulse responses and allows for tiled graphs with grey percentile range shading, IRFs are scaled to 
percentage points or percentage numbers, saves these impulse responses.
Important: this will replace Impulse response output file - if IRFs are not normalized to fixed shock size this will create wrong results in steps 3-5)
