synthetic control methods powered by the pyensmallen
library for fast optimisation.
Check out the notebooks
directory for synthetic and real data examples.
pip install git+https://github.com/apoorvalal/synthlearners/
or git clone and run uv pip install -e .
and make changes.
features are indicated by
- pending; good first PR; contributions welcome
- done
- unit weights [
/solvers.py
]- simplex (Abadie, Diamond, Hainmueller 2010, 2015)
- lasso (Hollingsworth and Wing 2024+)
- ridge (Imbens and Doudchenko 2016, Arkhangelsky et al 2021)
- matching (Imai, Kim, Wang 2023)
- support intercept term (Ferman and Pinto 2021, Doudchenko and Imbens)
- entropy weights (Hainmueller 2012, Hirschberg and Arkhangelsky 2023, Lal 2023)
- with multiple treated units, match aggregate outcomes (default) or individual outcomes (Abadie and L'Hour 2021)
- time weights
- L2 weights (Arkhangelsky et al 2021)
- time-distance penalised weights (Imbens et al 2024)
- augmenting weights with outcome models (Ben-Michael et al 2021)
- matrix completion (Athey et al 2021)
- latent factor models (Xu 2017, Lal et al 2024)
- two-way kernel ridge weights (Ben-Michael et al 2023)
- jacknife confidence intervals (multiple treated units) [Arkhangelsky et al 2021)
- permutation test (Abadie et al 2010)
- conformal inference (Chernozhukov et al 2021)
- raw outcome time series with treated average and synthetic control
- event study plot (treatment effect over time)
- weight distributions
Contributions welcome!