Cogent Agriculture (Data and Code)

Published: 30 June 2026| Version 1 | DOI: 10.17632/w9vm8wgr8c.1
Contributor:
Oluwaseun Oyebamiji

Description

This repository contains everything needed to reproduce the empirical results in "What Harms Food Security? Separating the Effects of Food Price Inflation and Volatility Across 148 Countries." The study uses an unbalanced panel of 148 countries from 2002 to 2022 to test whether sustained food price inflation and short-run food price volatility carry independent associations with food security, using a composite Food Security Index built from six FAO indicators alongside individual-indicator regressions. The repository is organized into four parts: the original, unmodified FAO and World Bank source files; the constructed analysis panel (panel_master.csv) and indicator-level dataset; a full variable codebook; and a complete replication pipeline in both Python and Stata, covering every table in the main text, appendix, and online supplement, including fixed-effects models with Driscoll-Kraay standard errors, the Common Correlated Effects Pooled (CCEP) estimator, two-way fixed effects, dynamic panel models, threshold regression, distributed lags, and Anderson-Hsiao/System-GMM robustness checks. Keywords: food security, food price inflation, food price volatility, panel data, cross-sectional dependence, Driscoll-Kraay, CCEP, FAO indicators, 148 countries

Files

Steps to reproduce

Step 0–1 — environment setup and a sanity check that the unzipped folder structure matches what's expected, with an explicit shortcut: if you trust the pre-built panel_master.csv, skip straight to Step 4 rather than rebuilding from raw files. Step 2 — the optional full rebuild from raw FAO/WDI sources, with the one honest gap flagged inline: the UPLOAD_DIR/OUTPUT_DIR path constants in 01_data_pipeline.py default to the sandbox paths (/mnt/user-data/...) and need editing for a local run, and the income_classification.csv/region_classification.csv lookup tables aren't included as standalone files since they're already baked into panel_master.csv's columns. Step 3 — run 09_validation.py immediately after any rebuild, with the exact expected console output so you know definitively whether the rebuild succeeded before wasting time on downstream steps. Steps 4–6 — the main results, the five additional analysis scripts (each independently runnable, order doesn't matter), then the Stata do-file for Anderson-Hsiao IV and System-GMM specifically, with the three GMM diagnostics you should check before trusting that output flagged explicitly. Step 7 — cross-checking Python against Stata, with the three things to verify first if numbers don't match. Step 8 — a lookup table mapping "if the manuscript cites this, run that script," so nobody has to read all nine Python files to find one number.

Institutions

Categories

Food Security, Price Discrimination

Licence