Elderly labor supply, endogenous grandparental childcare, and fertility in an OLG model.
Description
This repository contains the MATLAB scripts needed to replicate all figures from the article "Elderly labor supply, endogenous grandparental childcare, and fertility in an OLG model", by M. M. Baldi, R. Coppier, and E. Michetti. The goal is to replicate the results and figures published in the article, and each script serves a specific purpose in achieving this goal. LIST OF FILES: - figures_1_to_7.m: This script generates the figures presented in the article, specifically Figures 1 to 7. - figures_8_and_9.m: This script generates Figures 8 and 9 from the article. - figure_10.m: This script generates Figure 10 from the article. - figure_11.m: This script generates Figure 11 from the article. - figures_12_to_14.m: This script generates Figures 12 to 14 from the article. - constraint_check_region_B.m: This script checks if the constraints are satisfied for region B of the model. - dynamics.m: This script defines the dynamic evolution of the model, where it computes the paths of key variables over time. - feasibility_region_B.m: This code solves the constrained nonlinear programming problem (36)–(51) from the article, providing a feasible solution along with its approximation. A posteriori, it also verifies that the obtained feasible solution actually satisfies the original constraints. - initial_check.m: This script performs an initial check on the parameter values to ensure they meet the condition lambda - beta*delta > 0. - verify_eq_B.m: This script calculates the equilibrium values for the case B. - verify_eq_D.m: This script calculates the equilibrium values for the case D. - README.pdf: This file provides detailed instructions for replicating the figures in the article.
Files
Steps to reproduce
To generate the figures presented in the article, simply run the script starting with "figure " that contains the figure of interest, or for which the figure falls within the range specified in the file name. For example, to generate figure 3, simply run the script figures 1 to 7.m and specify figure 3 within the numFigure variable inside the script. Within the aforementioned files, you also need to specify the name of the folder where the figures will be saved. By default, it is assumed that the "figures" folder exists in the directory where the scripts in this repository are saved. If you wish to change the folder where the images are saved, you need to create that folder and specify its full path within the variable pathOut. For example, if you want to reproduce the four subfigures of Figure 4 in the folder "myDestination", located in the same directory as the scripts, you need to open the file figures 1 to 7.m and modify it as follows: numFigure = 4; pathOut = "./myDestination"; Once the code is executed, the subfigures figure 4 xt.pdf, figure 4 mut.pdf, figure 4 ht.pdf, and figure 4 nt.pdf will appear in the "myDestination" folder.
Institutions
Categories
Funding
This work has been funded by the European Union - NextGenerationEU under the Italian Ministry of University and Research (MUR) National Innovation Ecosystem grant ECS00000041 - VITALITY - CUP D83C22000710005.
ECS00000041 - VITALITY - CUP D83C22000710005