Skip to content

Add Bayesian RD example: politicians' salaries and corruption (BJPS replication)#974

Draft
daimon-pymclabs wants to merge 2 commits into
mainfrom
claude/rd-salaries-corruption-replication
Draft

Add Bayesian RD example: politicians' salaries and corruption (BJPS replication)#974
daimon-pymclabs wants to merge 2 commits into
mainfrom
claude/rd-salaries-corruption-replication

Conversation

@daimon-pymclabs

Copy link
Copy Markdown

What

An independent Bayesian regression-discontinuity replication, built entirely with CausalPy, of:

Klašnja, Fazekas & Alshaibani (2026), Revisiting the Link between Politicians' Salaries and Corruption, British Journal of Political Science.

Mayoral salaries across 11 EU countries jump discretely at population thresholds. The sharp RD asks whether the salary raise reduces procurement corruption risk (cri2 ∈ [0,1]). Running variable = % distance to the nearest threshold (cutoff 0); treatment = above threshold. Public data: Harvard Dataverse doi:10.7910/DVN/TESJMM (2.43M contracts).

Added under examples/rd_salaries_corruption/: a runnable notebook, a written findings report (REPORT.md), figures, a compact data extract so it runs without the 896 MB raw file, and the full reproduction pipeline in scripts/.

Why it's a good CausalPy example

It's a real, published, peer-reviewed RD on a large multi-country dataset (most RD examples are toy/single-cutoff), and it exercises CausalPy's RegressionDiscontinuity (bandwidth, donut_hole, effect_summary, discontinuity_at_threshold) while deliberately going beyond a global polynomial:

  • Local-linear bandwidth sweep — the modern RD default.
  • Polynomial-order instability demo — linear/quadratic/cubic estimates swing −0.04 → −0.10 → −0.18 on a fixed window (Gelman & Imbens 2019: don't do this).
  • A hierarchical, triangular-kernel-weighted, Beta-likelihood RD (custom PyMC): respects the bounded [0,1] outcome, adds city random intercepts (cluster analogue) + country fixed effects, separate slopes each side. 0 divergences, R̂ ≈ 1.004.

Findings (see REPORT.md)

  • The paper's frequentist headline reproduces exactly: rdrobust, unique-threshold sample, τ = −0.078 (p ≈ 1e-5).
  • The Bayesian RD agrees on direction: discontinuity in corruption risk is negative at posterior probability ≈ 1.0 at every bandwidth, and −0.044, 94% HDI [−0.082, −0.005] in the covariate-adjusted hierarchical Beta model. Higher salary ⇒ less corruption.
  • Reported honestly: the magnitude is specification-dependent (≈ −0.04 to −0.20 unadjusted), and a donut deletion flips the sign — symptoms of mass points / heaping in a pooled-threshold running variable (rdrobust flags "mass points detected"). The qualitative claim is credible; the point estimate is fragile.

Notes

  • Draft. Not wired into the docs toctree (the notebook needs the bundled data and isn't set up to execute in the docs build) — happy to integrate it as a rendered docs page if maintainers want.
  • Independent replication, not peer-reviewed.
  • Built with CausalPy 0.8.1 / PyMC 5.28.5.

🤖 Generated with Claude Code

…tion

Independent CausalPy replication of Klašnja, Fazekas & Alshaibani (BJPS 2026),
"Revisiting the Link between Politicians' Salaries and Corruption" — a sharp
regression discontinuity at population-based mayoral-salary thresholds.

Includes a runnable notebook, a written findings report, figures, a compact
data extract, and the full reproduction pipeline. Goes beyond the paper's
local-linear spec: bandwidth sweep, a polynomial-order instability demo
(Gelman & Imbens 2019), and a hierarchical, triangular-kernel-weighted,
Beta-likelihood RD with city random effects + country fixed effects.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants