Skip to main content

A Python package for causal inference methods including ATE estimation, propensity score methods, and meta-learners

Project description

Tests

Causal Inference Python Package - Josh Lim

This package provides key causal inference methods. These methods include ATE estimation from randomized experiments, propensity score methods, and meta-learners.

Installation

# Clone the repository
git clone https://github.com/jhl126/pycausal-inference-joshlim.git
cd pycausal-inference-joshlim

# Install in editable mode
uv pip install -e .

Usage

Import functions with the following code:

from pycausal_inference_joshlim import calculate_ate_ci, calculate_ate_pvalue
from pycausal_inference_joshlim import ipw, doubly_robust
from pycausal_inference_joshlim import s_learner_discrete, t_learner_discrete, x_learner_discrete, double_ml_cate

API Documentation

RCT Module

  • calculate_ate_ci(data) - Calculates the average treatment effect (ATE) and confidence interval from randomized experiment data
  • calculate_ate_pvalue(data) - Calculates the p-value for the ATE estimate

Propensity Score Module

  • ipw(data) - Estimates the ATE using inverse probability weighting
  • doubly_robust(data) - Estimates the ATE using the doubly robust estimator

Meta-Learners Module

  • s_learner_discrete(data) - Estimates heterogeneous treatment effects using the S-Learner approach
  • t_learner_discrete(data) - Estimates heterogeneous treatment effects using the T-Learner approach
  • x_learner_discrete(data) - Estimates heterogeneous treatment effects using the X-Learner approach
  • double_ml_cate(data) - Estimates heterogeneous treatment effects using Double ML

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

pycausal_inference_joshlim-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

pycausal_inference_joshlim-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file pycausal_inference_joshlim-0.1.0.tar.gz.

File metadata

File hashes

Hashes for pycausal_inference_joshlim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 637927a0720ce1f340c332af16e3f8641b41f2d33434f1b4dabd2a043cd896b2
MD5 91f187c7b5d55355b2e51cfd96bee90d
BLAKE2b-256 f9615a231caf9f073e71301dc043d84cc2a491e62123b1de808a8e77b82ca7c0

See more details on using hashes here.

File details

Details for the file pycausal_inference_joshlim-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pycausal_inference_joshlim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca40a572bb7107749912f560d2f8d9f6d2cad0a0bde9468b883206420ffef5de
MD5 47a7d34c23180a83dcca49c32081d6ff
BLAKE2b-256 df8b081a5b9b55e437a8bfa129d16503cf103d7db815d57c187f860942e02856

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