Add Bayesian RD example: politicians' salaries and corruption (BJPS replication)#974
Draft
daimon-pymclabs wants to merge 2 commits into
Draft
Add Bayesian RD example: politicians' salaries and corruption (BJPS replication)#974daimon-pymclabs wants to merge 2 commits into
daimon-pymclabs wants to merge 2 commits into
Conversation
…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>
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
An independent Bayesian regression-discontinuity replication, built entirely with CausalPy, of:
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 inscripts/.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:[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)rdrobust, unique-threshold sample, τ = −0.078 (p ≈ 1e-5).rdrobustflags "mass points detected"). The qualitative claim is credible; the point estimate is fragile.Notes
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.🤖 Generated with Claude Code