Skip to content

Releases

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 10 Nov 10:54
0ae8ccb

What's Changed

New Contributors

Full Changelog: v0.4.0...v0.4.1

v0.4.0 — Correct SDID time weights

Choose a tag to compare

@AluminumShark AluminumShark released this 04 Jun 07:00

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_treated and 1/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_se uses a local NumPy Generator instead of mutating global RNG state.
  • The library no longer calls logging.basicConfig at import time (uses a NullHandler).

Added

  • Correctness test suite (weights on the simplex, noiseless ATT recovery, pre-period retention, placebo exclusion) and plot_event_study coverage.

Docs

  • Corrected the time-weight and unit-weight formulas in the README (EN + 繁中).