Loading...
Loading...
Apply causal inference methods — counterfactual framework, instrumental variables, propensity score matching, and difference-in-differences — to estimate causal effects from observational data. Use this skill when the user needs to determine if X caused Y from non-experimental data, evaluate program/policy impact without a randomized trial, or control for confounders — even if they say 'did this change cause the improvement', 'how do we measure the impact without an experiment', or 'is this correlation or causation'.
npx skill4agent add asgard-ai-platform/skills stat-causal-inferenceIRON LAW: Correlation Is Not Causation — But Causation Is Estimable
Observational data cannot prove causation through correlation alone.
BUT with the right methodology (matching, IV, DID, RDD), we CAN
estimate causal effects from observational data — IF the assumptions
of each method are satisfied and explicitly tested.
The key question is always: "What would have happened WITHOUT the treatment?"
(the counterfactual)Y_i(treated)Y_i(treated) - Y_i(untreated)Y_i(untreated)| Method | When to Use | Key Assumption |
|---|---|---|
| RCT | You can randomize | Random assignment eliminates confounders |
| Propensity Score Matching (PSM) | Treatment is non-random but based on observables | No unobserved confounders (selection on observables) |
| Instrumental Variables (IV) | Unobserved confounders exist but you have an instrument | Instrument affects treatment but not outcome directly |
| Difference-in-Differences (DID) | Policy/event creates natural treatment/control groups | Parallel trends: groups would have trended similarly without treatment |
| Regression Discontinuity (RDD) | Treatment assigned by a cutoff | Observations just above/below cutoff are comparable |
| Synthetic Control | One treated unit, multiple control units (aggregate data) | Synthetic weighted combination matches pre-treatment trends |
# Causal Analysis: {Treatment} → {Outcome}
## Causal Question
- Treatment: {what intervention/event}
- Outcome: {what we're measuring}
- Counterfactual: {what would have happened without treatment}
## Identification Strategy
- Method: {PSM / IV / DID / RDD / etc.}
- Rationale: {why this method fits}
- Key assumption: {stated explicitly}
- Assumption test: {how we check, or acknowledge if untestable}
## Results
- Estimated causal effect: {magnitude with CI}
- Robustness checks: {alternative specifications}
## Limitations
{What could still invalidate these results}references/causal-dags.mdreferences/did-implementation.md