• Stars
    star
    269
  • Rank 151,800 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

causal-curve

build status codecov DOI

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

Table of Contents

Overview

(Version 1.0.0 released in January 2021!)

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). Both continuous and binary outcomes can be modeled against a continuous treatment.

Installation

Available via PyPI:

pip install causal-curve

You can also get the latest version of causal-curve by cloning the repository::

git clone -b main https://github.com/ronikobrosly/causal-curve.git
cd causal-curve
pip install .

Documentation

Documentation, tutorials, and examples are available at readthedocs.org

Contributing

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

Citation

Kobrosly, R. W., (2020). causal-curve: A Python Causal Inference Package to Estimate Causal Dose-Response Curves. Journal of Open Source Software, 5(52), 2523, https://doi.org/10.21105/joss.02523

References

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

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.

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

Kennedy EH, Ma Z, McHugh MD, Small DS. Nonparametric methods for doubly robust estimation of continuous treatment effects. Journal of the Royal Statistical Society, Series B. 79(4), 2017, pp.1229-1245.

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.

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.

More Repositories

1

awesome-data-leadership

A curated list of awesome posts, videos, and articles on leading a data team (small and large)
513
star
2

scipy_2022_causal_inference_tutorial

A set of decks and notebooks with exercises for use in a hands-on causal inference tutorial session
Jupyter Notebook
33
star
3

DAG_from_GNN

A revised and cleaned version of Yu and Chen et al.'s "DAG Structure Learning with Graph Neural Networks" algorithm.
Python
16
star
4

pydata_nyc_2022

Causal inference teaching materials for a proposed PyData NYC 2022 tutorial
Jupyter Notebook
12
star
5

scipy_2023_causal_inference_tutorial

Materials for a proposed Causal Inference Tutorial session at SciPy 2023
12
star
6

automated_elbow_method

My implementation of Mu Zhu's method for an automated elbow method
Python
3
star
7

obesity_ABM

An agent-based model for obesity, based on real NHANES data
Python
3
star
8

scipy_2024_causal_inference_tutorial

Materials for a proposed Causal Inference Tutorial session at SciPy 2024
2
star
9

simulated-annealing

Simulated annealing for variable selection in linear models
R
1
star
10

US_county_disadvantage

This R script creates a US map of county-level socioeconomic disadvantage
R
1
star
11

ronikobrosly

My personal repo
1
star
12

rummikub_AI

Attempt at AI that can parse the board tiles from an image and then suggest your move
Python
1
star
13

baby_names

Trends in baby names: clustering time series analysis
Jupyter Notebook
1
star
14

SuperLearner-Estimation

A function that uses the SuperLearner ensemble prediction method to estimate associations with bootstrap confidence intervals
R
1
star
15

awesome_bash_profile

My highly customized bash profile
1
star