Repository navigation
Releases
Releases · AluminumShark/Synthetic_Difference_in_Difference
v0.4.1
What's Changed
- ci: automate CI, PyPI/TestPyPI publishing and GitHub Releases by @AluminumShark in #1
- chore: bump version to 0.4.1 by @AluminumShark in #2
- feat: support Python 3.14 and release automatically on merge by @AluminumShark in #3
- chore: keep dev tooling in one place, not a published extra by @AluminumShark in #4
New Contributors
- @AluminumShark made their first contribution in #1
Full Changelog: v0.4.0...v0.4.1
v0.4.0 — Correct SDID time weights
v0.4.0
This release fixes a significant methodological bug in the estimator. Results from earlier versions should be re-run.
Fixed
- Time-weight estimation was degenerate. The previous objective minimized
(Σ λ·(treated−control diff) + intercept)²; a free intercept drove all time weights to zero, which silently dropped every pre-treatment observation from the final weighted regression. Time weights are now estimated per Arkhangelsky et al. (2021): for control units, a weighted average of pre-treatment outcomes predicts their post-treatment average, on the time simplex. - Unit weights are now constrained to the simplex (non-negative, sum to one) with the
ζ²ridge penalty from the paper. - Regression weights normalized to
1/N_treatedand1/T_post, so pre- and post-treatment observations are both retained. - Placebo bootstrap now discards the real treated units and assigns placebo treatment only among controls (Algorithm 4), rather than adding a second treated unit alongside the real one.
estimate_seuses a local NumPyGeneratorinstead of mutating global RNG state.- The library no longer calls
logging.basicConfigat import time (uses aNullHandler).
Added
- Correctness test suite (weights on the simplex, noiseless ATT recovery, pre-period retention, placebo exclusion) and
plot_event_studycoverage.
Docs
- Corrected the time-weight and unit-weight formulas in the README (EN + 繁中).