Implements local polynomial Regression Discontinuity (RD) point estimators with robust bias-corrected confidence intervals and inference procedures.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rdrobust-2.0.0.tar.gz.
File metadata
- Download URL: rdrobust-2.0.0.tar.gz
- Upload date:
- Size: 96.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
649c59040b6c5a9c0dc49040cd6d064150cdd264cea1c7697cb1148591cc3be3
|
|
| MD5 |
e7e643ce9fa1bed95dcf106edb93f9de
|
|
| BLAKE2b-256 |
abc1b90b40d15a5d345b36acbeb5144d1318270f3cf468a7e9e805355cef4053
|
Provenance
The following attestation bundles were made for rdrobust-2.0.0.tar.gz:
Publisher:
publish-python.yml on rdpackages/rdrobust
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rdrobust-2.0.0.tar.gz -
Subject digest:
649c59040b6c5a9c0dc49040cd6d064150cdd264cea1c7697cb1148591cc3be3 - Sigstore transparency entry: 1547249055
- Sigstore integration time:
-
Permalink:
rdpackages/rdrobust@3844d4312c1239cd09d7dd3399bc9a916f58c7da -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rdpackages
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@3844d4312c1239cd09d7dd3399bc9a916f58c7da -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file rdrobust-2.0.0-py3-none-any.whl.
File metadata
- Download URL: rdrobust-2.0.0-py3-none-any.whl
- Upload date:
- Size: 95.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d2cf08d35ec301da2159b2bf5f9ca4ebf0e7875cc3a2b3bb5f39179a5578f02
|
|
| MD5 |
a28d957e6a9b5abf96653e82ea687783
|
|
| BLAKE2b-256 |
89d4427b04fadb494feee692d18bc8ef0571eda3577feccb8a0a46e85fd710ce
|
Provenance
The following attestation bundles were made for rdrobust-2.0.0-py3-none-any.whl:
Publisher:
publish-python.yml on rdpackages/rdrobust
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rdrobust-2.0.0-py3-none-any.whl -
Subject digest:
0d2cf08d35ec301da2159b2bf5f9ca4ebf0e7875cc3a2b3bb5f39179a5578f02 - Sigstore transparency entry: 1547249066
- Sigstore integration time:
-
Permalink:
rdpackages/rdrobust@3844d4312c1239cd09d7dd3399bc9a916f58c7da -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rdpackages
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@3844d4312c1239cd09d7dd3399bc9a916f58c7da -
Trigger Event:
workflow_dispatch
-
Statement type: