This .zip file contains the MATLAB/DYNARE replication codes for the model developed in Eichenbaum,
Rebelo and Trabandt (2022),'Inequality in Life and Death', IMF Economic Review, March 2022, 70, pp. 68-104.


Link to paper and code: 
https://www.mathiastrabandt.com/research



This code was written and run with Matlab 2021a and DYNARE 4.6.1. The nonlinear
model is solved and simulated with Dynare's nonlinear deterministic solver

////////////////////////////////////////////////////////////
//IMPORTANT: You must use DYNARE 4.6.1 to run this code.//// 
////////////////////////////////////////////////////////////

The codes contain a lot of comments that describe in detail how the codes are set up. Please read the comments carefully.

The folder named <baseline> contains the baseline model code. Inspect and run ert_inequality.mod using Dynare 4.6.1. All other routines in the folder are called automatically.

The folder named <nocontainment> contains the version of the model without containment. Inspect and run ert_inequality.mod using Dynare 4.6.1. All other routines in the folder are called automatically.

The folder named <notransfers> contains the version of the model without transfers. Inspect and run ert_inequality.mod using Dynare 4.6.1. All other routines in the folder are called automatically.

The folder named <inequality> contains the code that produces Figure 7 of the paper. Inspect ert_inequality.mod and run the file run.m. All other routines in the folder are called automatically.

The folder named <sameprob> contains the version of the model with the same probability of dying for high and low skilled. Inspect and run ert_inequality.mod using Dynare 4.6.1. All other routines in the folder are called automatically.

The folder named <cbar0> contains the version of the model with cbar=0 as discussed in the main text. Inspect and run ert_inequality.mod using Dynare 4.6.1. All other routines in the folder are called automatically.

The folder named <flexwages> contains the version of the model with flexible wages. Inspect and run ert_inequality.mod using Dynare 4.6.1. All other routines in the folder are called automatically.

At the top of each .mod file you will find a description of the changes relative to the baseline model .mod file. 

The folder <Chetty_et_al_data> contains the data from Chetty et al. (2020) that we use to compare the model against. 

Finally, the files in this .zip file that are named plot_fig3....m, plot_fig4....m, etc are the MATLAB .m files that reproduce the model-based figures provided in the paper. 

Martin Eichenbaum, Sergio Rebelo and Mathias Trabandt (mathias.trabandt@gmail.com)

August 2021
 



