Skip to main content

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)

Dependencies

  • numpy
  • pandas
  • scipy
  • plotnine
  • matplotlib

References

For overviews and introductions, see rdpackages website.

Software and Implementation

Technical and Methodological



Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rdrobust-2.0.0.tar.gz (96.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rdrobust-2.0.0-py3-none-any.whl (95.3 kB view details)

Uploaded Python 3

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

Hashes for rdrobust-2.0.0.tar.gz
Algorithm Hash digest
SHA256 649c59040b6c5a9c0dc49040cd6d064150cdd264cea1c7697cb1148591cc3be3
MD5 e7e643ce9fa1bed95dcf106edb93f9de
BLAKE2b-256 abc1b90b40d15a5d345b36acbeb5144d1318270f3cf468a7e9e805355cef4053

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdrobust-2.0.0.tar.gz:

Publisher: publish-python.yml on rdpackages/rdrobust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for rdrobust-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d2cf08d35ec301da2159b2bf5f9ca4ebf0e7875cc3a2b3bb5f39179a5578f02
MD5 a28d957e6a9b5abf96653e82ea687783
BLAKE2b-256 89d4427b04fadb494feee692d18bc8ef0571eda3577feccb8a0a46e85fd710ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdrobust-2.0.0-py3-none-any.whl:

Publisher: publish-python.yml on rdpackages/rdrobust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page