CausalBoundingEngine Documentation

CausalBoundingEngine Logo

CausalBoundingEngine is a modular Python package for comparing and applying causal bounding algorithms. It provides a unified interface for computing bounds on causal effects in scenarios with unmeasured confounding.

PyPI version Python 3.8+ MIT License

Quick Start

Install the package:

pip install causalboundingengine

Basic usage:

import numpy as np
from causalboundingengine.scenarios import BinaryConf

# Your data
X = np.array([0, 1, 1, 0, 1])  # Treatment
Y = np.array([1, 0, 1, 0, 1])  # Outcome

# Create scenario and compute bounds
scenario = BinaryConf(X, Y)
ate_bounds = scenario.ATE.manski()  # (-1.0, 1.0)
pns_bounds = scenario.PNS.tianpearl()  # (0.0, 0.8)

Features

  • Multiple Algorithms: Manski, Tian-Pearl, Causaloptim, Autobound, ZhangBareinboim, Zaffalonbounds, and more

  • Unified Interface: Consistent API across all algorithms and scenarios

  • Multiple Scenarios: Support for confounded and instrumental variable settings

  • External Engine Support: Integration with R (via rpy2) and Java (via jpype1)

  • Extensible Design: Easy to add new algorithms and scenarios

Note

Attribution: CausalBoundingEngine integrates algorithms from multiple published research papers. Please see the References and Credits section for complete citations and attribution when using this library in your research.

Indices and tables