--- id: rdrobust version: "2.0.0" license: GPL-3.0-only license_treatment: copyleft maintenance: active --- # rdrobust — Implements local polynomial Regression Discontinuity (RD) point estimators with robust bias-corrected confidence intervals and inference procedures. License: copyleft · Maintenance: active · Downloads: 89.8K/mo ## What it is and what it does rdrobust is a Python implementation of regression discontinuity design methods for causal inference, translating the methodological framework from econometrics into a usable statistical package. It provides three main functions: rdrobust for point estimation and hypothesis testing with robust bias-corrected inference, rdbwselect for data-driven bandwidth selection, and rdplot for diagnostic visualization. The package depends on numpy, pandas, scipy for numerical computation, and plotnine and matplotlib for graphical output. The package targets applied researchers and econometricians who work with quasi-experimental designs where a treatment assignment changes sharply at a threshold. It handles heteroskedasticity-robust and cluster-robust variance estimation, supports covariate adjustment, and implements the bias-correction and coverage-error optimization methods described in the underlying academic literature. Installation is straightforward, and the package includes a bundled Senate dataset for quick experimentation. Use it for: - Estimate causal effects in policy evaluations where treatment is assigned based on a threshold (e.g., eligibility cutoffs) - Conduct robust inference on discontinuities in outcome variables at known policy discontinuities - Select optimal bandwidth for RD estimation automatically using data-driven procedures - Generate diagnostic plots of RD relationships with binned means and local polynomial fits - Perform cluster-robust inference when observations are grouped (e.g., by state or region) ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Implements regression discontinuity (RD) design estimation, inference, and plotting using local polynomial methods with robust bias-corrected confidence intervals. Yes, if you work with regression discontinuity designs in econometrics or causal inference. The package is actively maintained, has no known vulnerabilities, installs with low friction, and implements state-of-the-art bias-corrected methods backed by peer-reviewed research. The GPL-3.0-only license is a constraint only if you need to incorporate it into proprietary software. ## Install pip install rdrobust uv add rdrobust poetry add rdrobust ## Installing rdrobust Before you install: Low friction installation with five common scientific dependencies (numpy, pandas, scipy, plotnine, matplotlib). Actively maintained with recent releases; last commit 2026-08-14. License in practice: GPL-3.0-only copyleft license requires any derivative work or distribution to also be GPL-3.0-only; acceptable for research and open-source projects but incompatible with proprietary software. Quickstart: pip install rdrobust from rdrobust import rdrobust, rdrobust_RDsenate df = rdrobust_RDsenate() r = rdrobust(y=df['vote'], x=df['margin'], vce='hc3') Requires Python >= 3.9 Verify before relying: - Whether cluster-robust variance (CRV3) implementation matches Pustejovsky-Tipton 2018 exactly as claimed - Performance characteristics with large datasets (memory footprint, computation time) - Compatibility with pandas/numpy versions beyond the minimum supported ## Package facts - License: GPL-3.0-only (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 89.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags regression discontinuity estimation, RD design inference, local polynomial regression, causal inference discontinuity, bias-corrected confidence intervals, bandwidth selection RD, regression discontinuity plots, econometric discontinuity analysis, causal-inference, econometrics, quasi-experimental-design [View on SkillFed](https://skillfed.io/packages/rdrobust) · [View on PyPI](https://pypi.org/project/rdrobust/)