Skip to main content

A python library with tools to perform causal inference using observational data when the treatment of interest is continuous.

Project description

causal-curve

build status

codecov

Python tools to perform causal inference using observational data when the treatment of interest is continuous.

The Antikythera mechanism, an ancient analog computer, with lots of beautiful curves.

Table of Contents

Overview

There are many implemented methods to perform causal inference when your intervention of interest is binary, but few methods exist to handle continuous treatments.

This is unfortunate because there are many scenarios (in industry and research) where these methods would be useful. For example, when you would like to:

  • Estimate the causal response to increasing or decreasing the price of a product across a wide range.
  • Understand how the number of minutes per week of aerobic exercise causes positive health outcomes.
  • Estimate how decreasing order wait time will impact customer satisfaction, after controlling for confounding effects.
  • Estimate how changing neighborhood income inequality (Gini index) could be causally related to neighborhood crime rate.

This library attempts to address this gap, providing tools to estimate causal curves (AKA causal dose-response curves).

Installation

pip install causal-curve

Documentation

Documentation is available at readthedocs.org

Contributing

Your help is absolutely welcome! Please do reach out or create a feature branch!

References

Galagate, D. Causal Inference with a Continuous Treatment and Outcome: Alternative Estimators for Parametric Dose-Response function with Applications. PhD thesis, 2016.

Moodie E and Stephens DA. Estimation of dose–response functions for longitudinal data using the generalised propensity score. In: Statistical Methods in Medical Research 21(2), 2010, pp.149–166.

Hirano K and Imbens GW. The propensity score with continuous treatments. In: Gelman A and Meng XL (eds) Applied bayesian modeling and causal inference from incomplete-data perspectives. Oxford, UK: Wiley, 2004, pp.73–84.

van der Laan MJ and Gruber S. Collaborative double robust penalized targeted maximum likelihood estimation. In: The International Journal of Biostatistics 6(1), 2010.

van der Laan MJ and Rubin D. Targeted maximum likelihood learning. In: ​U.C. Berkeley Division of Biostatistics Working Paper Series, 2006.

Imai K., Keele L., Tingley D. A General Approach to Causal Mediation Analysis. Psychological Methods. 15(4), 2010, pp.309–334.

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

causal-curve-0.3.5.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

causal_curve-0.3.5-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file causal-curve-0.3.5.tar.gz.

File metadata

  • Download URL: causal-curve-0.3.5.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

File hashes

Hashes for causal-curve-0.3.5.tar.gz
Algorithm Hash digest
SHA256 4569e81e3d33f6be0f0fe5a7ebe763a737b4ad43cfbcee235633bc43bc7951c9
MD5 1135b1dfc76e1980fa892fc206bdcfff
BLAKE2b-256 3fed0158fafcf6b0dca30826c658b5ea812aa3acf3f075429f18205b96758c79

See more details on using hashes here.

File details

Details for the file causal_curve-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: causal_curve-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

File hashes

Hashes for causal_curve-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ea91f3bfc003dd46d1c808825f21394b335b84f82e1e0fdba770ef218ee0dd19
MD5 3a5a0533c67154debd7840abe9fd1a31
BLAKE2b-256 da4fc3c229b61e12ae627d35e04eae81e518f2e127e058c000c85f375b83d495

See more details on using hashes here.

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