From ad399284e318ee72c0904e4df7be4bd575a86ff4 Mon Sep 17 00:00:00 2001 From: igerber Date: Sat, 28 Mar 2026 21:23:54 -0400 Subject: [PATCH] Bump version to 2.7.6 Adds CHANGELOG entry covering survey Phase 6 advanced features (bootstrap+survey, replicate weights, DEFF, subpopulation) and AI practitioner guardrails (Baker et al. 2025). Co-Authored-By: Claude Opus 4.6 (1M context) --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ diff_diff/__init__.py | 2 +- docs/llms-full.txt | 2 +- pyproject.toml | 2 +- rust/Cargo.toml | 2 +- 5 files changed, 33 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57016f35..45effb3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.7.6] - 2026-03-28 + +### Added +- **AI practitioner guardrails** based on Baker et al. (2025) "Difference-in-Differences Designs: A Practitioner's Guide" + - `practitioner.py` module with 8-step workflow enforcement for AI agents + - Estimator-specific handlers ensuring correct diagnostic ordering (pre-trends before estimation, Bacon decomposition before estimator selection) + - `docs/llms.txt`, `docs/llms-practitioner.txt`, `docs/llms-full.txt` for AI agent discoverability + - Evaluation rubric (`docs/practitioner-guide-evaluation.md`) with correctness-aware scoring +- **Survey Phase 6: Advanced features** + - Survey-aware bootstrap for all 8 bootstrap-using estimators (PSU-level multiplier for CS/Imputation/TwoStage/Continuous/Efficient; Rao-Wu rescaled for SA/SyntheticDiD/TROP) + - Replicate weight variance estimation (BRR, Fay's BRR, JK1, JKn) for OLS-based and IF-based estimators + - Per-coefficient DEFF diagnostics comparing survey vs SRS variance + - Subpopulation analysis via `SurveyDesign.subpopulation()` preserving full design structure + - CS analytical expansion: strata/PSU/FPC for aggregated SEs via `compute_survey_if_variance()` + - TROP cross-classified pseudo-strata for survey-aware bootstrap + +### Changed +- Estimator-specific guidance for parallel trends tests and placebo checks (no shared templates) +- SDiD and TROP split into separate decision tree branches in practitioner workflow + +### Fixed +- Fix replicate weight df calculation using pivoted QR rank with R-compatible tolerance +- Fix replicate IF variance score scaling for EfficientDiD, TripleDiff, ContinuousDiD +- Fix panel-to-unit replicate weight propagation and normalization +- Fix CS zero-mass return type and vectorized guard for survey paths +- Fix `solve_logit` effective-sample validation for zero-weight designs +- Fix subpopulation mask validation and EfficientDiD bootstrap guard + ## [2.7.5] - 2026-03-23 ### Added @@ -978,6 +1006,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `to_dict()` and `to_dataframe()` export methods - `is_significant` and `significance_stars` properties +[2.7.6]: https://github.com/igerber/diff-diff/compare/v2.7.5...v2.7.6 [2.7.5]: https://github.com/igerber/diff-diff/compare/v2.7.4...v2.7.5 [2.7.4]: https://github.com/igerber/diff-diff/compare/v2.7.3...v2.7.4 [2.7.3]: https://github.com/igerber/diff-diff/compare/v2.7.2...v2.7.3 diff --git a/diff_diff/__init__.py b/diff_diff/__init__.py index bcc5552b..e29da6dd 100644 --- a/diff_diff/__init__.py +++ b/diff_diff/__init__.py @@ -194,7 +194,7 @@ Bacon = BaconDecomposition EDiD = EfficientDiD -__version__ = "2.7.5" +__version__ = "2.7.6" __all__ = [ # Estimators "DifferenceInDifferences", diff --git a/docs/llms-full.txt b/docs/llms-full.txt index a53dd24f..93846ad1 100644 --- a/docs/llms-full.txt +++ b/docs/llms-full.txt @@ -2,7 +2,7 @@ > A Python library for Difference-in-Differences causal inference analysis. Provides sklearn-like estimators with statsmodels-style output for econometric analysis. -- Version: 2.7.5 +- Version: 2.7.6 - Repository: https://github.com/igerber/diff-diff - License: MIT - Dependencies: numpy, pandas, scipy (no statsmodels dependency) diff --git a/pyproject.toml b/pyproject.toml index d5dd2e97..fd269e4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "diff-diff" -version = "2.7.5" +version = "2.7.6" description = "Difference-in-Differences causal inference with sklearn-like API. Callaway-Sant'Anna, Synthetic DiD, Honest DiD, event studies, parallel trends." readme = "README.md" license = "MIT" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index a1f16203..c9fbdfb3 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "diff_diff_rust" -version = "2.7.5" +version = "2.7.6" edition = "2021" description = "Rust backend for diff-diff DiD library" license = "MIT"