ir-gravity-model

Community

Model trade, RTAs, and conflict tone in dyads.

Authorxjtulyc
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps you perform international relations quantitative research by estimating gravity-style trade relationships (including zero trade flows) and linking them to regional trade agreements (RTAs) and bilateral news event tone from GDELT.

Core Features & Use Cases

  • PPML gravity estimation: Estimate bilateral trade flows with Poisson Pseudo-Maximum Likelihood to remain consistent with zeros and heteroscedasticity, using exporter/importer/year fixed effects.
  • RTA trade effect measurement: Capture trade creation vs trade diversion using an RTA-in-force variable (and a framework for interpreting dyadic RTA exposure).
  • GDELT dyadic event aggregation: Download (GDELT 1.0 CSV daily exports), aggregate events to monthly/annual dyad-periods, and compute conflict/cooperation metrics using GoldsteinScale and AvgTone.
  • Workflow integration: Load COW bilateral trade data, merge CEPII GeoDist controls (distance/contiguity/language proxies), optionally merge GDP and RTA datasets, and compare PPML vs log-OLS as a robustness check.

Quick Start

Estimate a PPML gravity model linking dyadic trade (including zeros) with bilateral distance and RTA exposure while aggregating GDELT event tone to dyad-month level for additional interpretation.

Dependency Matrix

Required Modules

pandas>=1.5statsmodels>=0.14numpy>=1.23matplotlib>=3.6requests>=2.28

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: ir-gravity-model
Download link: https://github.com/xjtulyc/awesome-rosetta-skills/archive/main.zip#ir-gravity-model

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.