Logo Lanfrica
  • Accueil
  • Atlas
  • Analyses
  • Documentation
  • Sign in

© 2026 Lanfrica. Tous droits réservés. Tous les droits d'auteur des ressources affichées sur le site Web Lanfrica appartiennent aux détenteurs de droits d'auteur d'origine, sauf indication contraire explicite.

Supplementary Code for: Climate Shocks and Regime Dependence: A Structural Analysis of Macroeconomic Stability in the MENA Region

Domaine:

climatesocioeconomic

Type de record:

software
Créateur:
Anonymous
Éditeur:
Zenodo
Hôte:avatar

Abstract

This repository contains the Python code used to generate all statistical results and figures presented in the manuscript "Climate Shocks and Regime Dependence: A Structural Analysis of Macroeconomic Stability in the MENA Region". The code provides a complete replication package for the empirical analysis, enabling researchers to verify and build upon the findings.

Methodology Overview

The code implements a comprehensive empirical strategy including:

  • MENA Climate Risk Index (MCRI): Construction of a composite climate shock index using Principal Component Analysis (PCA) integrating temperature anomalies, rainfall deviations, and SPEI-12 drought intensity.

  • Unit Root and Cointegration Tests: Augmented Dickey-Fuller (ADF), Kwiatkowski-Phillips-Schmidt-Shin (KPSS), and Engle-Granger tests to establish integration and cointegration properties.

  • Linearity Tests: Comparison of linear VAR and Markov-switching VAR using AIC and BIC criteria.

  • Tunisia VAR: Linear structural VAR with Cholesky decomposition to compute impulse response functions for GDP growth, inflation, and FDI.

  • Egypt MS-AR: Univariate Markov-switching autoregressive models for GDP growth, inflation, and FDI, capturing regime-dependent dynamics.

  • Robustness Checks: Alternative lag lengths, subsample analysis, and alternative climate index specifications.

  • Figure Generation: All main text and appendix figures in publication-ready format.

File Structure

text
Supplementary_Code.zip
├── README.txt                 # Instructions and file descriptions
├── requirements.txt           # Python package dependencies
├── 01_data_preprocessing.py   # Data loading, MCRI construction, normalization
├── 02_unit_root_tests.py      # ADF, KPSS, PP tests
├── 03_cointegration_tests.py  # Engle-Granger and Johansen tests
├── 04_linearity_tests.py      # Linearity tests (AIC comparison)
├── 05_tunisia_var.py          # Linear VAR for Tunisia (Figure 4)
├── 06_egypt_ms_ar.py          # MS-AR models for Egypt (Figures 5-6)
├── 07_appendix_figures.py     # Appendix A and F figures
├── 08_robustness_checks.py    # Alternative specifications
└── 09_main_figures.py         # Main text figures (Figures 1-3)

Requirements

  • Python 3.8 or higher

  • Dependencies listed in requirements.txt

Install with:

bash
pip install -r requirements.txt

Usage

Run the scripts in numerical order:

bash
python 01_data_preprocessing.py
python 02_unit_root_tests.py
python 03_cointegration_tests.py
python 04_linearity_tests.py
python 05_tunisia_var.py
python 06_egypt_ms_ar.py
python 07_appendix_figures.py
python 08_robustness_checks.py
python 09_main_figures.py

Data Sources

The code uses publicly available data from:

  • Climate data: Climatic Research Unit (CRU TS v4.0), SPEI Global Database

  • Macroeconomic data: World Bank World Development Indicators (WDI)

  • Institutional data: Varieties of Democracy (V-Dem), Worldwide Governance Indicators (WGI)

Processed panel data are generated by the 01_data_preprocessing.py script.

Output

  • Figures: Saved as PNG and PDF in the current directory

  • Tables: Printed to console and saved as Excel files

  • Results: Excel files containing unit root, cointegration, and linearity test results

License

This code is released under the MIT License.

Visit

doi.org

Licenses

info:eu-repo/semantics/restrictedAccessCreative Commons Attribution 4.0 Internationalhttps://creativecommons.org/licenses/by/4.0/legalcode

Similaires

The effect of crude oil price shocks on macroeconomic stability in GhanaOil Price Shocks, Fuel Subsidies and Macroeconomic (In)stability in NigeriaFiscal Policy and Macroeconomic Shocks in Nigeria: A Structural Vector Auto - Regression SVAR ApproachStructural Transmission of Global Shocks to Domestic Inflation: A Structural Vector Autoregressive Analysis for GhanaThe effects of future climate change shocks on macroeconomic aggregates via agricultural production in Tunisia: A dynamic general equilibrium analysisData and code for "Significant impacts of climate shocks in African smallholder agriculture"

The effect of crude oil price shocks on macroeconomic stability in Ghana

Abstract The paper studies the effects of underlying shocks of crude oil price movements on the sta

Oil Price Shocks, Fuel Subsidies and Macroeconomic (In)stability in Nigeria

This paper studies the macroeconomic implications of oil price shocks and the extant fuel subsidy re

Fiscal Policy and Macroeconomic Shocks in Nigeria: A Structural Vector Auto - Regression SVAR Approach

The paper investigates fiscal policy and macroeconomic shocks in Nigeria. It was motivated by the no

Structural Transmission of Global Shocks to Domestic Inflation: A Structural Vector Autoregressive Analysis for Ghana

This study examines the transmission of global geopolitical risk (GPR), Global Supply Chain Pressure

The effects of future climate change shocks on macroeconomic aggregates via agricultural production in Tunisia: A dynamic general equilibrium analysis

This study aims to analyze the direct and indirect impact of future climate changes on agricultural

Data and code for "Significant impacts of climate shocks in African smallholder agriculture"