Skip to content

Commit cf71da1

Browse files
committed
Prepare v2.0.2 release: SE accuracy improvements
Update version to 2.0.2 and document the CallawaySantAnna SE computation fix that now exactly matches R's did package. The weight influence function (wif) formula was corrected to use n_g / n_all for pg computation and iterate over keepers with individual ATT(g,t) values, reducing SE difference from ~2.5% to <0.01% vs R.
1 parent f87946c commit cf71da1

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.0.2] - 2026-01-15
9+
10+
### Fixed
11+
- **CallawaySantAnna SE computation** now exactly matches R's `did` package
12+
- Fixed weight influence function (wif) formula for "simple" aggregation
13+
- Corrected `pg` computation: uses `n_g / n_all` (matching R) instead of `n_g / total_treated`
14+
- Fixed wif iteration: iterates over keepers (post-treatment pairs) with individual ATT(g,t) values
15+
- SE difference reduced from ~2.5% to <0.01% vs R's `did` package (essentially exact match)
16+
- Point estimates unchanged; all existing tests pass
17+
818
## [2.0.1] - 2026-01-13
919

1020
### Added
@@ -358,6 +368,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
358368
- `to_dict()` and `to_dataframe()` export methods
359369
- `is_significant` and `significance_stars` properties
360370

371+
[2.0.2]: https://github.com/igerber/diff-diff/compare/v2.0.1...v2.0.2
361372
[2.0.1]: https://github.com/igerber/diff-diff/compare/v2.0.0...v2.0.1
362373
[2.0.0]: https://github.com/igerber/diff-diff/compare/v1.4.0...v2.0.0
363374
[1.4.0]: https://github.com/igerber/diff-diff/compare/v1.3.1...v1.4.0

diff_diff/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
plot_sensitivity,
114114
)
115115

116-
__version__ = "2.0.1"
116+
__version__ = "2.0.2"
117117
__all__ = [
118118
# Estimators
119119
"DifferenceInDifferences",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "diff-diff"
7-
version = "2.0.1"
7+
version = "2.0.2"
88
description = "A library for Difference-in-Differences causal inference analysis"
99
readme = "README.md"
1010
license = "MIT"

0 commit comments

Comments
 (0)