Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

<!-- docs-start -->

# Causal Inference for Quasi-Experiments
# CausalPy — Open-Source Bayesian Causal Inference for Python

**Research-grade causal inference workflows** for quasi-experimental designs in Python.
**Research-grade causal inference workflows** for quasi-experimental designs.

CausalPy helps you estimate causal effects with transparent assumptions, uncertainty-aware modeling, and reproducible outputs:

Expand Down Expand Up @@ -150,6 +150,8 @@ CausalPy emphasizes transparent, uncertainty-aware outputs for rigorous causal a
- **Practical significance:** ROPE (Region of Practical Equivalence) analysis to assess whether effects exceed meaningful thresholds
- **Direction testing:** Tail probabilities (e.g., P(effect > 0)) for directional inference

<!-- docs-end -->

## Citing CausalPy

If you use CausalPy in your research, please cite it. A Zenodo DOI for stable releases is planned. In the meantime, you can cite the repository:
Expand Down
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
html_css_files = ["custom.css"]
html_extra_path = ["robots.txt"]
html_favicon = "_static/favicon_logo.png"
html_title = "CausalPy — Open-Source Bayesian Causal Inference for Python"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
Expand Down
35 changes: 35 additions & 0 deletions docs/source/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
myst:
html_meta:
description: "CausalPy is an open-source Python package for Bayesian causal inference in quasi-experiments. Supports synthetic control, difference-in-differences, regression discontinuity, interrupted time series, and more — with full uncertainty quantification via PyMC."
keywords: "causal inference, Python, Bayesian, quasi-experiment, synthetic control, difference-in-differences, regression discontinuity, interrupted time series, PyMC, causal impact"
---

:::{image} _static/logo.png
:width: 40 %
:align: center
Expand All @@ -6,6 +13,34 @@

```{include} ../../README.md
:start-after: <!-- docs-start -->
:end-before: <!-- docs-end -->
```

## How CausalPy compares

The Python causal inference ecosystem has several strong packages, each with different strengths. Here's how CausalPy fits in:

| | CausalPy | DoWhy | CausalML | pyfixest |
|---|---|---|---|---|
| **Primary focus** | Quasi-experimental causal effect estimation | End-to-end causal reasoning pipeline (graph → identify → estimate → refute) | Uplift modeling and heterogeneous treatment effects (CATE/ITE) | High-dimensional fixed effects regression (econometrics) |
| **Bayesian estimation** | First-class via PyMC, with full posterior distributions and HDI | Limited — primarily frequentist estimators | No | No |
| **Uncertainty quantification** | Credible intervals (HDI), ROPE analysis, tail probabilities | Confidence intervals, refutation tests | Confidence intervals | Cluster-robust and heteroscedasticity-robust standard errors |
| **Synthetic control** | Yes — Bayesian weighted | No | No | No |
| **Difference-in-differences** | Yes — including staggered adoption | Yes — as one of many estimators | No | Yes — TWFE, Did2s, Sun-Abraham |
| **Regression discontinuity** | Yes — Bayesian and OLS | No | No | No |
| **Interrupted time series** | Yes | No | No | No |
| **Causal discovery** | No — use causal-learn or DoWhy-GCM | Yes — via DoWhy-GCM extension | No | No |
| **Uplift / CATE modeling** | No — use CausalML or EconML | Yes — via EconML integration | Yes — primary focus | No |
| **Best for** | Teams that need uncertainty-aware estimates from a quasi-experimental design | Projects that require formal identification and robustness testing across a causal DAG | A/B test personalization, targeting optimization, CATE estimation | Fast econometric regressions with many fixed effects |

### When to choose CausalPy

CausalPy is the right choice when you have a **plausible quasi-experimental design** — a policy change, a geo-targeted campaign, a threshold rule — and you want **Bayesian uncertainty quantification** over the causal effect. If you need to reason about causal graphs and formal identification strategies, start with **DoWhy**. If you need heterogeneous treatment effects from A/B tests, look at **CausalML**. If you need fast fixed-effects regressions at scale, **pyfixest** is purpose-built for that.

CausalPy complements these packages rather than replacing them. Many teams use DoWhy for identification and CausalPy for estimation, or pyfixest for initial exploration and CausalPy for Bayesian analysis with full uncertainty.

```{include} ../../README.md
:start-after: <!-- docs-end -->
```

:::{toctree}
Expand Down