Install any skill in seconds. Free to start, no credit card required.
Get Started Free →brycewang-stanford/dowhy
Causal inference framework for answering "does X cause Y?" beyond correlation. DoWhy (Microsoft Research) provides the identify-estimate-refute loop: define a causal graph (DAG), identify the causal effect using backdoor/frontdoor/instrumental variable criteria, estimate treatment effects with multiple estimators, and validate results with automated refutation tests.
Passed 21 of 22 test cases with the skill, and 20 of 22 without it.
1 fixed20 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
We have a dataset with 50 columns from an e-commerce platform. We have no domain expertise or hypothesis about how these variables interact or which variables cause which. Can we directly estimate causal effects by running automated identification and backdoor regression without defining a DAG theory?
| Checked | Without skill | With skill |
|---|---|---|
| Advises against attempting causal estimation without a domain-informed causal DAG hypothesis. | Passed | Passed |
| Recommends qualitative research or exploratory analysis to establish domain hypotheses before specifying causal models. | Missed | Passed |
The instructions your model reads when the skill loads.
DoWhy answers the question every analyst actually wants answered: "Does X cause Y, or is it just correlated?" Correlation is everywhere. Causation requires structure — a causal graph that encodes which variables influence which. DoWhy's workflow is three steps: Identify (is the effect estimable from this graph?) → Estimate (compute the effect) → Refute (is this estimate robust?).
CORRELATION: X and Y move together. Could be:
X → Y (X causes Y)
Y → X (Y causes X)
X ← C → Y (C confounds both — spurious!)
CAUSATION: We need to know WHY they move together.
A causal graph (DAG) encodes our assumptions.
Then math tells us: "Given this graph,
CAN we estimate the causal effect from data?"
→ If yes: which variables to control for?
→ If no: what additional data do we need?
When NOT to use: Pure prediction (use sklearn). Randomized controlled trials with no confounders (simple A/B test suffices). When you have no theory about the causal structure — you need at least a hypothesis about the DAG.
DoWhy docs: https://dowhy.readthedocs.io/en/latest/
GitHub: https://github.com/py-why/dowhy
Causal graph tutorials: https://dowhy.readthedocs.io/en/latest/tutorials.html
Search patterns: CausalModel, identify_effect, estimate_effect, refute_estimate
A Directed Acyclic Graph where arrows mean "causes". A → B means A is a cause of B. This is your assumptions about the world — not learned from data. You draw it based on domain knowledge. The graph is what makes causal inference possible.
test cases passed, vs 20 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.