Metadata-Version: 2.4
Name: pycausal-inference-joshlim
Version: 0.1.0
Summary: A Python package for causal inference methods including ATE estimation, propensity score methods, and meta-learners
Author-email: Josh Lim <j.lim703@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/jhl126/pycausal-inference-joshlim
Project-URL: Documentation, https://github.com/jhl126/pycausal-inference-joshlim#readme
Project-URL: Repository, https://github.com/jhl126/pycausal-inference-joshlim
Project-URL: Bug Tracker, https://github.com/jhl126/pycausal-inference-joshlim/issues
Keywords: causal inference,statistics,machine learning,treatment effects
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.3.0
Requires-Dist: numpy>=1.21.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: scikit-learn>=1.0.0
Requires-Dist: lightgbm>=3.3.0
Requires-Dist: patsy>=0.5.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=3.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: pylint>=2.12.0; extra == "dev"
Requires-Dist: mypy>=0.950; extra == "dev"
Dynamic: license-file

[![Tests](https://github.com/jhl126/pycausal-inference-joshlim/workflows/Tests/badge.svg)](https://github.com/jhl126/pycausal-inference-joshlim/actions)

# 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

```bash
# 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:

```python
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
