Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 4.65 KB

README_pre.md

File metadata and controls

41 lines (26 loc) · 4.65 KB

ViewCount Star Fork Star DOI

This is a work-in-progress Matlab package consisting of functions that solve the dynamic life cycle model in Nygård, Sørensen and Wang (2021). The paper is titled Optimal allocations to heterogeneous agents with an application to the COVID-19 stimulus checks. Nygård, Sørensen and Wang (2021) supersedes two prior papers, Nygård, Sørensen and Wang (2020) as well as Wang (2020). The code companion presents solutions to the dynamic life-cycle problem, and methods for evaluating the marginal gains from allocating additional stimulus checks. Tested with Matlab 2020a.

All functions are parts of a matlab toolbox that can be installed:

Download and install the Matlab toolbox: PrjOptiSNW.mltbx

The Code Companion can also be accessed via the bookdown site and PDF linked below:

bookdown pdf, MathWorks File Exchange

This files below consists of a collection of mlx based vignettes for functions that are available from PrjOptiSNW. Each Vignette file contains various examples for invoking each function.

The package relies on MEconTools, which needs to be installed first. The package does not include allocation functions, only simulation code to generate the value of each stimulus check increments for households. Allocation functions rely the R optimal allocation package PrjOptiAlloc.

The files below largely document contents in the Matlab-based PrjOptiSNW folder of the repository. The AllocateR folder contains additional documentation for various functions and files that solve allocation problems based on functions in the R PrjOptiAlloc package and solutions csv files generated by the dynamic programming files from the Matlab-based PrjOptiSNW folder. Some additional results for the paper are included in the additional_results folder.

Please contact FanWangEcon for issues or problems.

Installation

In addition to downloading and installing PrjOptiSNW.mltbx, can also:

# Clone Package from Git Bash
cd "C:/Downloads"
git clone https://github.com/fanwangecon/PrjOptiSNW.git

Install the Package from inside Matlab:

# Install Matlab Toolbox PrjOptiSNW
toolboxFile = 'C:/Downloads/PrjOptiSNW/PrjOptiSNW.mltbx';
# toolboxFile = 'C:/Users/fan/PrjOptiSNW/PrjOptiSNW.mltbx';
agreeToLicense = true;
installedToolbox = matlab.addons.toolbox.installToolbox(toolboxFile, agreeToLicense)