Skip to main content

Tests

PyPI version

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

Install from PyPI:

pip install pycausal-inference-joshlim

Or install in editable mode for development:

git clone https://github.com/jhl126/pycausal-inference-joshlim.git
cd pycausal-inference-joshlim
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

Metadata

Release files for pycausal-inference-joshlim 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycausal-inference-joshlim 0.1.1
File Size Uploaded
pycausal_inference_joshlim-0.1.1.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycausal-inference-joshlim 0.1.1
File Interpreter ABI Platform
pycausal_inference_joshlim-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.0 kB

Release files / pycausal_inference_joshlim-0.1.1.tar.gz

Download URL pycausal_inference_joshlim-0.1.1.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bb9995464e3563a609ce18d7281de289891de3f7594bc1a69909a9eab54bc6f9
BLAKE2b-256 checksum
How to use checksums
2d99da0ce7848a7993898afe1d1677a75891713f79c492b29cebd0056deda541
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / pycausal_inference_joshlim-0.1.1-py3-none-any.whl

Download URL pycausal_inference_joshlim-0.1.1-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5beed2c1ad0fdeed690d649d3c6ad5ddef4455a06c5bd066bbdd6848cfa59b2d
BLAKE2b-256 checksum
How to use checksums
70925fa57d43a2a3157b85f87004370b50c06df601ca39d562f636f98b360c66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page