Replication Data for: Systematic risk profiling: Assessing compounding economic risks in developing countries
Description
This repository contains the full replication package for the paper "Systematic risk profiling: Assessing compounding economic risks in developing countries." It includes all necessary code and data to reproduce the analysis for Kenya, Rwanda, and Malawi. The package is organized into three parts following the Systematic Risk Profiling (SRP) approach: - Sampling shock scenarios (R). - CGE model simulations (GAMS). - Ranking risks and generating final outputs (R). See the included README.txt for step-by-step instructions on running the simulations and generating the tables/figures found in the manuscript.
Files
Steps to reproduce
OVERVIEW The logic follows "Figure 1. The systematic risk profiling (SRP) approach" in the main manuscript. SOFTWARE REQUIREMENTS 1. R (for sampling shocks and ranking risks) 2. GAMS (for CGE simulations) NOTE: "0project.gpr" is provided for GAMS IDE users. STEP 1: SAMPLING SHOCK SCENARIOS Software: R Locations: - Kenya: \data\KEN_2019\sampling - Rwanda: \data\RWA_2019\sampling - Malawi: \data\MWI_2019\sampling INSTRUCTIONS: 1. Input Data: Each country folder contains "1. Historical_data_for_sampling.xlsx". This file draws from "0. prepared_main.xlsx" (see "Table 4. Domain of exogenous shocks" in the manuscript). 2. Run Script: Run "2. Sampling_static.R". 3. Key outputs: - "4.Sampled_scenarios.csv": This file is used in Step 2. - Figure 2: World market prices (Historical data). - Figure 4: Marginal distributions of sampled shocks. - Figure 5: Variance-covariance structures of sampled shocks. STEP 2: CGE SIMULATIONS Software: GAMS CONFIGURATION: - Country Selection: At the beginning of the GAMS files, ensure the line $setglobal country "KEN_2019" defines the correct subfolder (change to "RWA_2019" or "MWI_2019" as needed). - Poverty/Undernourishment: In "2setting_simulations.gms" (approx. line 331), comment or uncomment the $setglobal survey switches using * to match the target country. EXECUTION SEQUENCE: Run the following files in order. Ensure the command line parameters are included exactly as specified below: 1. File: 1model.gms Command Line: s=model gdx=model (Output: model.gdx. Used to compile Table 2, Table 5, Table B.1, and Table A.1). 2. File: 2setting_simulations.gms Command Line: r=model s=setup (Function: Sets up country-specific simulations generated in Step 1). 3. File: 3simulations_STATIC.gms Command Line: r=setup (Function: Runs the simulations). OUTPUTS: Simulation results are saved to the respective country folders: - \output\KEN_2019 - \output\RWA_2019 - \output\MWI_2019 NOTE ON DETERMINISTIC ANALYSIS To replicate Table 3, Table A.2, and Table B.2: 1. Locate the file "2sampled_scenarios_[country].xlsx" (sheet "scenarios"). 2. Manually change the inputs to the 3 scenarios defined in the analysis: - Cereal Yields: +/- 20% (via pd_cere; set others to 0). - World Price of Beverage Crops: +/- 20% (via pw_becr; set others to 0). - Foreign Capital Flows: +/- 2% of GDP. STEP 3: RANKING RISKS Software: R Locations: - Kenya: \output\KEN_2019 - Rwanda: \output\RWA_2019 - Malawi: \output\MWI_2019 INSTRUCTIONS: Run the country-specific R code located in the folders listed above. PERFORMANCE WARNING: The LMG metrics calculation is computationally intensive. To skip this, comment out the section marked "computationally intensive part - start" through "end". OUTPUTS: - Figure 6: Distributions of key economic outcomes. - Figure 3: Example of single tree - Tables 6-12: Standard deviations, LMG decomposition, and RF-CART decomposition for GDP, Private Consumption, Poverty, and Undernourishment.
Institutions
- International Food Policy Research InstituteDC, Washington