Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Estimates causal effects with DoWhy: builds causal graphs, identifies effects, estimates them, and runs refutation checks.
82% 91%+9 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 18 of 22 without it.
How do I install the standard Python library for causal inference that supports graph modeling, identification, estimation, and refutation tests?
Recommends running uv pip install dowhy
3 of 3 safety checks passed
DoWhy (Microsoft/py-why) provides end-to-end causal inference: causal graph modeling (DAG), identification strategies (back-door, front-door, instrumental variables), estimation (linear regression, matching, IV, double-ML), and refutation tests (placebo, bootstrap, random common cause, data subset).
uv pip install dowhy
from dowhy import CausalModel
model = CausalModel(
data=df,
treatment="treatment",
outcome="outcome",
common_causes=["age", "gender", "income"],
)
# 1. Identify
identified = model.identify_effect(proceed_when_unidentifiable=True)
# 2. Estimate
estimate = model.estimate_effect(identified, method_name="backdoor.linear_regression")
print(f"ATE: {estimate.value:.4f} (p={estimate.p_value:.4f})")
# 3. Refute
refute = model.refute_estimate(identified, estimate, method_name="placebo_treatment_refuter")
print(f"Refutation passed: {refute.refutation_result}")
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.