Impact of Gold Price Shocks on Social Conflict

Causal inference and spatial econometrics in the Peruvian Amazon

Causal Inference
Stata
Python
Mining
Spatial Econometrics
Applied microeconometrics project using custom Stata tools (usecasen, projectinit) for conflict analysis. Spatial lag model with row-standardized weights matrix.
Author

Maykol Medrano

Published

January 10, 2026

Overview

This research analyzes the impact of international commodity prices on local social conflicts in the Peruvian Amazon, utilizing custom data processing tools (usecasen and enahodata) developed for streamlined econometric analysis.

Research Question

How do gold price shocks causally affect social conflict frequency and intensity in resource-dependent regions?

Methodology

Identification Strategy: - Difference-in-Differences (DiD) approach - Spatial econometrics to account for spillover effects between districts - Shift-Share IV for robustness checks

Key Model Specifications:

Main Estimates: Impact on Social Conflict Frequency
Variable OLS (1) FE (2) Spatial ML (3)
Gold Price Shocks 0.452*** 0.381*** 0.312**
(0.012) (0.015) (0.021)
Controls YES YES YES
Fixed Effects NO YES YES
N 15,420 15,420 15,420

Data Sources: - ENAHO household surveys (2015-2022) - International commodity price data (World Bank) - Social conflict registry (Defensoría del Pueblo)

Key Findings

  • Gold price shocks significantly increase conflict probability
  • Effects strongest in districts with weak institutional capacity
  • Spatial spillover effects documented in neighboring regions
  • Expansion of illegal mining represents major challenge for environmental governance

“The expansion of illegal mining in Madre de Dios represents one of the most significant challenges for environmental governance and social peace in Peru.”

Implementation

Software Tools: - Custom Stata commands: usecasen, projectinit - Python for spatial analysis and visualization - Integration with Applied Microeconometrics teaching materials (PUC-Chile)

* Load data using custom command
usecasen 2022, clear
projectinit, setup("Conflict_Analysis")

* Main analysis with fixed effects
reghdfe conflict gold_shock population_density canon_transfers, ///
    absorb(district year) ///
    cluster(district)

* Export results
outreg2 using "results/main_table.tex", replace tex
import geopandas as gpd
import matplotlib.pyplot as plt
from scipy.spatial import distance_matrix

# Load spatial data
peru_map = gpd.read_file("data/peru_districts.geojson")

# Spatial visualization
fig, ax = plt.subplots(1, 1, figsize=(10, 10))
peru_map.plot(column='conflict_intensity',
              ax=ax,
              legend=True,
              cmap='OrRd',
              scheme='quantiles')

plt.title("Spatial Distribution of Social Conflicts")
plt.show()

Reproducibility Best Practices

As a Teaching Assistant for Applied Microeconometrics at PUC-Chile, this project demonstrates:

  • Folder structure initialization with projectinit
  • Automated data processing pipelines
  • Reproducible path management
  • Clear documentation and code commenting

Technical Details: - Spatial lag model with row-standardized weights matrix - Robust standard errors clustered at district level - Multiple hypothesis testing corrections


Citation

@unpublished{medrano2026impact,
  title={Impact of Gold Price Shocks on Social Conflict: Causal Inference and Spatial Econometrics in the Peruvian Amazon},
  author={Medrano, Maykol},
  year={2026},
  note={Working Paper},
  url={https://maykolmedrano.github.io/projects/data-analysis.html}
}

APA Format: Medrano, M. (2026). Impact of Gold Price Shocks on Social Conflict: Causal Inference and Spatial Econometrics in the Peruvian Amazon [Working Paper]. https://maykolmedrano.github.io/projects/data-analysis.html


Full working paper and replication code available upon request.