RDROBUST
The package rdrobust implements estimation, inference, and graphical procedures for Regression Discontinuity (RD) designs using local polynomial methods.
rdrobust: point estimation and robust bias-corrected inference.rdbwselect: data-driven bandwidth selection for RD estimation and inference.rdplot: data-driven RD plots based on binned means and local polynomial fits.
See references for methodological and practical details.
Website: https://rdpackages.github.io/.
Source code: https://github.com/rdpackages/rdrobust.
Authors
Sebastian Calonico (scalonico@ucdavis.edu)
Matias D. Cattaneo (matias.d.cattaneo@gmail.com)
Max H. Farrell (mhfarrell@gmail.com)
Ricardo Masini (ricardo.masini@gmail.com)
Rocio Titiunik (rocio.titiunik@gmail.com)
Installation
To install/update use pip:
pip install rdrobust
Usage
from rdrobust import rdrobust, rdbwselect, rdplot, plot_rdrobust, rdrobust_RDsenate
# Load bundled Senate dataset (1390 x 14)
df = rdrobust_RDsenate()
# Sharp RD with HC3 heteroskedasticity-robust variance
r = rdrobust(y=df['vote'], x=df['margin'], vce='hc3')
# Cluster-robust variance (CRV3, Pustejovsky-Tipton 2018)
r = rdrobust(y=df['vote'], x=df['margin'], cluster=df['state'], vce='cr3')
# Bandwidth selection
bw = rdbwselect(y=df['vote'], x=df['margin'], all=True)
# Diagnostic plot of an rdrobust object, with effect panel
fig = plot_rdrobust(r, y=df['vote'], x=df['margin'], show_effect=True)
- Replication: rdrobust illustration, rdplot illustration, senate data.
Dependencies
- numpy
- pandas
- scipy
- plotnine
- matplotlib
References
For overviews and introductions, see rdpackages website.
Software and Implementation
-
Calonico, Cattaneo and Titiunik (2014): Robust Data-Driven Inference in the Regression-Discontinuity Design.
Stata Journal 14(4): 909-946. -
Calonico, Cattaneo and Titiunik (2015): rdrobust: An R Package for Robust Nonparametric Inference in Regression-Discontinuity Designs.
R Journal 7(1): 38-51. -
Calonico, Cattaneo, Farrell and Titiunik (2017): rdrobust: Software for Regression Discontinuity Designs.
Stata Journal 17(2): 372-404.
Technical and Methodological
-
Calonico, Cattaneo and Titiunik (2014): Robust Nonparametric Confidence Intervals for Regression-Discontinuity Designs.
Econometrica 82(6): 2295-2326.
Supplemental Appendix. -
Calonico, Cattaneo and Titiunik (2015): Optimal Data-Driven Regression Discontinuity Plots.
Journal of the American Statistical Association 110(512): 1753-1769.
Supplemental Appendix. -
Calonico, Cattaneo and Farrell (2018): On the Effect of Bias Estimation on Coverage Accuracy in Nonparametric Inference.
Journal of the American Statistical Association 113(522): 767-779.
Supplemental Appendix. -
Calonico, Cattaneo, Farrell and Titiunik (2019): Regression Discontinuity Designs Using Covariates.
Review of Economics and Statistics 101(3): 442-451.
Supplemental Appendix. -
Calonico, Cattaneo and Farrell (2020): Optimal Bandwidth Choice for Robust Bias Corrected Inference in Regression Discontinuity Designs.
Econometrics Journal 23(2): 192-210.
Supplemental Appendix. -
Calonico, Cattaneo and Farrell (2022): Coverage Error Optimal Confidence Intervals for Local Polynomial Regression.
Bernoulli 28(4): 2998-3022.
Supplemental Appendix.
Metadata
Release files for rdrobust 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rdrobust-2.1.0.tar.gz | 97.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rdrobust-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 193.4 kB
Release files / rdrobust-2.1.0.tar.gz
| Download URL | rdrobust-2.1.0.tar.gz |
|---|---|
| Size | 97.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
240eb2f030adab74bb50857467e3601d4ec8ddab99199cf3687ca962ce1f5434
|
|
BLAKE2b-256 checksum How to use checksums |
16e918978fcde50c7bc2882938e94c0f8976ca6e76510ce3b518d1d7ff5f4a30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logRelease files / rdrobust-2.1.0-py3-none-any.whl
| Download URL | rdrobust-2.1.0-py3-none-any.whl |
|---|---|
| Size | 95.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8179f8f75445876297317a9805b81cbbf2e1e39bf804a460a8c23d0d7fa33263
|
|
BLAKE2b-256 checksum How to use checksums |
80cd578839f29b1e724adab0b950f1527997c960e56effb221cef2ecc6c44c33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency log