RDPOWER
The package rdpower implements power, sample size, and minimum detectable effect calculations for Regression Discontinuity (RD) designs using local polynomial methods.
rdpower: ex-post power calculations for RD treatment effects.rdsampsi: required sample size calculations for target power.rdmde: minimum detectable effect calculations.
See references for methodological and practical details.
Website: https://rdpackages.github.io/.
Source code: https://github.com/rdpackages/rdpower.
Authors
Matias D. Cattaneo (matias.d.cattaneo@gmail.com)
Ricardo Masini (ricardo.masini@gmail.com)
Rocio Titiunik (rocio.titiunik@gmail.com)
Gonzalo Vazquez-Bare (gvazquezbare@gmail.com)
Installation
To install/update use pip:
pip install rdpower
Usage
import pandas as pd
from rdpower import rdmde, rdpower, rdsampsi
data = pd.read_csv("rdpower_senate.csv")
z = data[["demvoteshfor2", "demmv"]]
power = rdpower(data=z, tau=5)
sample_size = rdsampsi(data=z, tau=5)
mde = rdmde(data=z)
- Replication: rdpower illustration, senate data.
Dependencies
- numpy
- pandas
- scipy
- rdrobust
- matplotlib
References
For overviews and introductions, see rdpackages website.
Software and Implementation
- Cattaneo, Titiunik and Vazquez-Bare (2019): Power Calculations for Regression Discontinuity Designs.
Stata Journal 19(1): 210-245.
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, 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.
Metadata
Release files for rdpower 2.0.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 | |
|---|---|---|---|
| rdpower-2.0.0.tar.gz | 16.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rdpower-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.5 kB
Release files / rdpower-2.0.0.tar.gz
| Download URL | rdpower-2.0.0.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a01582b632554d139244f30e32e1d26883c7e14cf6530b25da2eee8d35b74b9
|
|
BLAKE2b-256 checksum How to use checksums |
357a8e602d0a25a8e2a1d29b12c5ecec5ca006992e7f66726bca9ac340822f1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 15, 2026.
Transparency logRelease files / rdpower-2.0.0-py3-none-any.whl
| Download URL | rdpower-2.0.0-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d2650aea1ee59188cc7c98d74dc07bdd470cafcd67579039589bbca235ad4a7
|
|
BLAKE2b-256 checksum How to use checksums |
67793c79796dab090b2acc5ce72bbd17715a1f214903fe5659f94832a200f9dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 15, 2026.
Transparency log