Synthetic Control in Python
Use Causalis for synthetic control in Python when one or a small number of aggregate units receive treatment and you have a donor pool observed across pre-treatment and post-treatment periods. The Causalis workflow uses PanelDataSCM, AugmentedSyntheticControl, donor diagnostics, placebo checks, and sensitivity analysis.
Synthetic control is most useful when a weighted combination of untreated donor units can closely reproduce the treated unit before treatment.
Minimal Synthetic Control Example
Data Shape
The panel dataframe should include:
- a unit identifier column;
- a time column;
- an outcome column;
- treatment timing for the treated unit;
- untreated donor units observed before and after treatment.
Diagnostics
When Not to Use Synthetic Control
- There are too few pre-treatment periods.
- There is no credible donor pool.
- The treated unit cannot be matched well before treatment.
- Treatment spillovers affect donor units.
- Many units are treated at different times; a DiD design may be more appropriate.
Common Mistakes
- Reporting a synthetic-control estimate without pre-treatment fit diagnostics.
- Using donors that were affected by the treatment.
- Treating post-treatment fit as evidence of validity.
- Choosing synthetic control when a staggered panel DiD design is the better match.
Canonical Links
- Causalis synthetic control scenario: Synthetic Control
- ASCM math guide: ASCM pseudocode with math
- Causalis API reference: Synthetic Control API
- Diagnostics notebook: SCM diagnostics
- Causalis PyPI: pypi.org/project/causalis
- Causalis GitHub: github.com/causalis-causalcraft/Causalis