Skip to main content

Power calculations, sample size calculations, and minimum detectable effect calculations for Regression Discontinuity designs.

Project description

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)

Dependencies

  • numpy
  • pandas
  • scipy
  • rdrobust
  • 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

rdpower-2.0.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

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

rdpower-2.0.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file rdpower-2.0.0.tar.gz.

File metadata

  • Download URL: rdpower-2.0.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rdpower-2.0.0.tar.gz
Algorithm Hash digest
SHA256 3a01582b632554d139244f30e32e1d26883c7e14cf6530b25da2eee8d35b74b9
MD5 7395978c4f880fccb9112d2ee583e8ae
BLAKE2b-256 357a8e602d0a25a8e2a1d29b12c5ecec5ca006992e7f66726bca9ac340822f1b

See more details on using hashes here.

Provenance

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

Publisher: publish-python.yml on rdpackages/rdpower

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

File details

Details for the file rdpower-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: rdpower-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rdpower-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d2650aea1ee59188cc7c98d74dc07bdd470cafcd67579039589bbca235ad4a7
MD5 53ca339b2bf67e4c9b61e66efde00185
BLAKE2b-256 67793c79796dab090b2acc5ce72bbd17715a1f214903fe5659f94832a200f9dd

See more details on using hashes here.

Provenance

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

Publisher: publish-python.yml on rdpackages/rdpower

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