Choosing CausalPy Methods
Use this skill to translate a user's causal question into a CausalPy experiment choice. This is the design-intake skill, not the implementation skill. Once the method is chosen, hand off to running-causalpy-experiments for constructor details, model configuration, priors, summaries, plots, and interpretation.
Intake Checklist
- Restate the estimand: ATE, ATT, local threshold effect, treatment-on-treated over time, cumulative impact, or a policy/campaign lift.
- Identify the data shape: single time series, wide panel of units, long panel of unit-time rows, cross-section, or pre/post group data.
- Identify treatment assignment: known intervention time, staggered adoption, threshold/cutoff, kink, instrument, observed treatment with confounders, or treated unit plus donor pool.
- Check the identifying story: parallel trends, no anticipation, no manipulation at cutoff, valid instrument, overlap/positivity, convex hull/donor support, or trend continuity.
- Recommend one primary CausalPy experiment and any plausible alternatives, then explain the extra data or assumptions needed to choose among them.
Fast Routing
- One treated time series, known intervention time, no donor pool:
InterruptedTimeSeries.
- Known level/slope changes in one time series, especially multiple interruptions:
PiecewiseITS.
- Treated and control groups observed before and after one intervention:
DifferenceInDifferences.
- Units adopt treatment at different times:
StaggeredDifferenceInDifferences.
- One or more treated units with multiple untreated donor units in wide panel format:
SyntheticControl.
- Synthetic-control setting where both unit weights and pre-period time weights are part of the design:
SyntheticDifferenceInDifferences.
- Panel regression or fixed-effects adjustment is the target rather than a named quasi-experimental design:
PanelRegression.
- Pretest/posttest nonequivalent groups with a baseline outcome:
PrePostNEGD.
- Treatment assigned by crossing a cutoff in a running variable:
RegressionDiscontinuity.
- Treatment intensity changes slope at a threshold rather than jumping in level:
RegressionKink.
- Treatment is endogenous but there is a credible instrument:
InstrumentalVariable.
- Observational binary treatment with measured confounders and overlap:
InversePropensityWeighting.
Output Pattern
When you use this skill, return:
- Recommended method: name the CausalPy experiment class.
- Why it fits: tie the recommendation to data shape, assignment mechanism, and estimand.
- Required columns/data layout: list the minimal data structure needed.
- Key assumptions: state what must be credible for a causal interpretation.
- Main risks: name obvious failure modes or sensitivity checks.
- Next step: route to
running-causalpy-experiments and the relevant method reference.
References
- Experiment decision guide
1---2name: choosing-causalpy-methods3description: Choose the appropriate CausalPy experiment class from a causal question, data structure, treatment assignment, and identification assumptions. Use before writing analysis code when the method is not yet settled.4---56# Choosing CausalPy Methods78Use this skill to translate a user's causal question into a CausalPy experiment choice. This is the design-intake skill, not the implementation skill. Once the method is chosen, hand off to `running-causalpy-experiments` for constructor details, model configuration, priors, summaries, plots, and interpretation.910## Intake Checklist11121. Restate the estimand: ATE, ATT, local threshold effect, treatment-on-treated over time, cumulative impact, or a policy/campaign lift.132. Identify the data shape: single time series, wide panel of units, long panel of unit-time rows, cross-section, or pre/post group data.143. Identify treatment assignment: known intervention time, staggered adoption, threshold/cutoff, kink, instrument, observed treatment with confounders, or treated unit plus donor pool.154. Check the identifying story: parallel trends, no anticipation, no manipulation at cutoff, valid instrument, overlap/positivity, convex hull/donor support, or trend continuity.165. Recommend one primary CausalPy experiment and any plausible alternatives, then explain the extra data or assumptions needed to choose among them.1718## Fast Routing1920- One treated time series, known intervention time, no donor pool: `InterruptedTimeSeries`.21- Known level/slope changes in one time series, especially multiple interruptions: `PiecewiseITS`.22- Treated and control groups observed before and after one intervention: `DifferenceInDifferences`.23- Units adopt treatment at different times: `StaggeredDifferenceInDifferences`.24- One or more treated units with multiple untreated donor units in wide panel format: `SyntheticControl`.25- Synthetic-control setting where both unit weights and pre-period time weights are part of the design: `SyntheticDifferenceInDifferences`.26- Panel regression or fixed-effects adjustment is the target rather than a named quasi-experimental design: `PanelRegression`.27- Pretest/posttest nonequivalent groups with a baseline outcome: `PrePostNEGD`.28- Treatment assigned by crossing a cutoff in a running variable: `RegressionDiscontinuity`.29- Treatment intensity changes slope at a threshold rather than jumping in level: `RegressionKink`.30- Treatment is endogenous but there is a credible instrument: `InstrumentalVariable`.31- Observational binary treatment with measured confounders and overlap: `InversePropensityWeighting`.3233## Output Pattern3435When you use this skill, return:3637- Recommended method: name the CausalPy experiment class.38- Why it fits: tie the recommendation to data shape, assignment mechanism, and estimand.39- Required columns/data layout: list the minimal data structure needed.40- Key assumptions: state what must be credible for a causal interpretation.41- Main risks: name obvious failure modes or sensitivity checks.42- Next step: route to `running-causalpy-experiments` and the relevant method reference.4344## References4546- [Experiment decision guide](reference/experiment_decision_guide.md)