Petrostates & Conflict Initiation
Do oil-rich leaders start wars to survive at home? Drawing on my own research, this project models the number of militarized interstate disputes a country initiates each year as a function of coup risk and petrostate status — using Poisson and negative-binomial regression built from the likelihood up, and an interactive dashboard for the central interaction.
// the argument
Petrostates behave more aggressively abroad than other states. My theory locates the cause not in oil wealth alone, but in the strategic position of vulnerable leaders. When a leader faces a credible internal threat — a high coup risk — oil revenue gives them the means to start interstate conflicts that coup-proof the regime: co-opting the military with budgets and missions, rallying the public around nationalism, and buying time to repress opposition. Conflict initiation, on this account, is a tool of domestic survival.
Coup risk raises the rate of MID initiation, and the effect is amplified in petrostates, whose oil income removes the budget constraint on diversionary conflict — a petrostate × coup-risk interaction.
// data & measurement
The unit is the country-year, 1960–2010, restricted to non-democracies
(Polity < 7). The outcome is the count of militarized interstate disputes a state
initiates in a year (Correlates of War / UCDP via the
peacesciencer
package). Coup risk follows Belkin & Schofer / Sudduth (2017); oil dependence is fuel income
as a share of GDP from Haber &
Menaldo's fiscal-reliance data (petrostate = fuel ≥ 10% of GDP); controls cover fuel exports,
military spending, GDP per capita, and ongoing civil war. The pipeline ships a calibrated
simulation so it runs offline; flip USE_REAL_DATA to load the merged panel.
def poisson_irls(X, y):
"""log E[y] = Xβ via iteratively reweighted least squares (= Newton for a GLM)."""
beta = np.zeros(X.shape[1]); beta[0] = np.log(y.mean())
for _ in range(100):
mu = np.exp(np.clip(X @ beta, -30, 30)) # mean = variance (Poisson)
z = (X @ beta) + (y - mu) / mu # working response
W = mu # IRLS weights
beta = np.linalg.solve((X*W[:,None]).T @ X, (X*W[:,None]).T @ z)
return beta
// why count models
MID initiation is a count: a non-negative integer, mostly zero, occasionally several. Ordinary regression would predict negative and fractional conflicts and mis-state the uncertainty. The Poisson model fixes the support by modelling the log rate, but it assumes the mean equals the variance — and conflict data are far more dispersed than that, with a glut of zeros and a long right tail.
A Pearson dispersion of 1.30 (> 1) confirms it, so I also fit a negative binomial, which adds a parameter α so the variance can exceed the mean (Var = μ + αμ²). It fits substantially better on AIC — the inference below uses it.
// interactive · simulate a regime
The widget runs the fitted negative-binomial model in your browser. Set a country's oil dependence and controls, then watch how its predicted conflict rate rises with coup risk — and how the petrostate and non-petrostate curves diverge. The dot marks the coup-risk level you select.
// results · the models
Both estimators agree on the story. Higher coup risk and petrostate status each raise the rate of conflict initiation, and the interaction is positive: the marginal effect of coup risk is larger for petrostates. Coefficients are reported as incidence-rate ratios (eβ) — the multiplicative change in the expected MID count.
# Negative binomial: Var = μ + αμ² (α>0 absorbs the overdispersion)
def loglik(theta):
beta, alpha = theta[:-1], np.exp(theta[-1]); r = 1/alpha
mu = np.exp(np.clip(X @ beta, -30, 30))
return np.sum(gammaln(y+r) - gammaln(r) - gammaln(y+1)
+ r*np.log(r/(r+mu)) + y*np.log(mu/(r+mu)))
# maximized by Newton-Raphson + line search -> α = 1.49, beats Poisson on AIC
| term | coef | IRR = eβ | std. err | z | p | 95% CI (IRR) |
|---|---|---|---|---|---|---|
| (intercept) | -2.243 | 0.106 | 0.062 | -36.10 | 0.000* | 0.09–0.12 |
| coup risk | +0.565 | 1.760 | 0.054 | 10.48 | 0.000* | 1.58–1.96 |
| petrostate | +0.735 | 2.086 | 0.127 | 5.79 | 0.000* | 1.63–2.67 |
| petrostate × coup risk | +0.290 | 1.336 | 0.077 | 3.77 | 0.000* | 1.15–1.55 |
| fuel export share | +0.996 | 2.708 | 0.412 | 2.42 | 0.016* | 1.21–6.08 |
| military spending (z) | +0.068 | 1.071 | 0.093 | 0.74 | 0.459 | 0.89–1.28 |
| log GDP/capita (z) | -0.171 | 0.843 | 0.032 | -5.28 | 0.000* | 0.79–0.90 |
| ongoing civil war | +0.506 | 1.658 | 0.103 | 4.92 | 0.000* | 1.35–2.03 |
| term | coef | IRR | std. err | z | p | 95% CI (IRR) |
|---|---|---|---|---|---|---|
| (intercept) | -2.250 | 0.105 | 0.056 | -40.23 | 0.000* | 0.09–0.12 |
| coup risk | +0.574 | 1.776 | 0.047 | 12.24 | 0.000* | 1.62–1.95 |
| petrostate | +0.723 | 2.060 | 0.105 | 6.91 | 0.000* | 1.68–2.53 |
| petrostate × coup risk | +0.231 | 1.260 | 0.059 | 3.90 | 0.000* | 1.12–1.42 |
| fuel export share | +1.168 | 3.215 | 0.311 | 3.75 | 0.000* | 1.75–5.92 |
| military spending (z) | +0.053 | 1.055 | 0.077 | 0.69 | 0.489 | 0.91–1.23 |
| log GDP/capita (z) | -0.158 | 0.854 | 0.026 | -6.17 | 0.000* | 0.81–0.90 |
| ongoing civil war | +0.530 | 1.699 | 0.077 | 6.88 | 0.000* | 1.46–1.98 |
// the central finding · the interaction
The interaction is the heart of the argument. For a non-petrostate, rising coup risk nudges conflict up modestly. For a petrostate, the same rise in coup risk produces a far steeper climb — oil revenue converts domestic vulnerability into the capacity for diversionary war. This is the pattern behind cases like Iraq under Saddam Hussein and revolutionary Iran.
| model | log-lik | k | AIC | dispersion |
|---|---|---|---|---|
| Poisson | -2850.2 | 8 | 5716.4 | 1.30 |
| Negative Binomial | -2715.1 | 9 | 5448.2 | 1.00 |
// what this demonstrates
- Count-data modelling — Poisson by IRLS and a negative binomial by maximum likelihood, both coded from scratch, with the log-Gamma evaluated via a Lanczos approximation (no SciPy).
- Diagnosing the right model — detecting overdispersion and excess zeros, and choosing the estimator the data actually require.
- Interactions & quantities of interest — translating an interaction coefficient into incidence-rate ratios and predicted counts a reader can feel.
- From paper to product — turning my own published research design into a reproducible pipeline and a dependency-free interactive visualization.