A Python package for causal inference methods including ATE estimation, propensity score methods, and meta-learners
Project description
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 datacalculate_ate_pvalue(data)- Calculates the p-value for the ATE estimate
Propensity Score Module
ipw(data)- Estimates the ATE using inverse probability weightingdoubly_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 approacht_learner_discrete(data)- Estimates heterogeneous treatment effects using the T-Learner approachx_learner_discrete(data)- Estimates heterogeneous treatment effects using the X-Learner approachdouble_ml_cate(data)- Estimates heterogeneous treatment effects using Double ML
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycausal_inference_joshlim-0.1.0.tar.gz.
File metadata
- Download URL: pycausal_inference_joshlim-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
637927a0720ce1f340c332af16e3f8641b41f2d33434f1b4dabd2a043cd896b2
|
|
| MD5 |
91f187c7b5d55355b2e51cfd96bee90d
|
|
| BLAKE2b-256 |
f9615a231caf9f073e71301dc043d84cc2a491e62123b1de808a8e77b82ca7c0
|
File details
Details for the file pycausal_inference_joshlim-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pycausal_inference_joshlim-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca40a572bb7107749912f560d2f8d9f6d2cad0a0bde9468b883206420ffef5de
|
|
| MD5 |
47a7d34c23180a83dcca49c32081d6ff
|
|
| BLAKE2b-256 |
df8b081a5b9b55e437a8bfa129d16503cf103d7db815d57c187f860942e02856
|