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 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
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)
| File | Size | Uploaded | |
|---|---|---|---|
| pycausal_inference_joshlim-0.1.1.tar.gz | 6.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|