Skip to content

Commit 60815e3

Browse files
docs(readme): surface v1.4.2 release notes in README + README_CN
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1598f8b commit 60815e3

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,18 @@ StatsPAI is the **agent-native** Python package for causal inference and applied
1515

1616
It brings R's [Causal Inference Task View](https://cran.r-project.org/web/views/CausalInference.html) (fixest, did, rdrobust, gsynth, DoubleML, MatchIt, CausalImpact, ...) and Stata's core econometrics commands into a single, consistent Python API.
1717

18-
**🎉 NEW in v1.4.1 — v3-frontier Sprint 3: AKM shock-clustered SE, Claude extended thinking, parity + integration suites, 2 new guides**
18+
**🎉 NEW in v1.4.2 — correctness patches + Proximal / QTE / Causal-RL family guides**
19+
20+
StatsPAI 1.4.2 is a patch release. No breaking changes, no new public signatures — just two silent-wrong-numbers fixes and three family guides closing the last gaps between the v3 reference and the published documentation.
21+
22+
- **⚠️ correctness fix — `sp.dml_model_averaging` √n SE scaling bug.** The cross-candidate variance aggregator treated the sample-mean influence-function outer product as `Var(θ̂_avg)` directly, missing a final `/ n`. Reported SEs were `√n` times too large; on the canonical n=400 DGP the 95% CI width was 4.20 (nominal ≈ 0.21) and empirical coverage was 100%. After the fix, CI width is 0.21 and coverage is ≈ nominal. Regression guard: `tests/test_dml_model_averaging.py::test_se_on_correct_scale`.
23+
- **⚠️ correctness fix — `sp.gardner_did` event-study reference-category contamination.** Stage-2 dummy regression pooled never-treated units *and* treated units outside the event-study horizon into a single baseline, dragging every event-time coefficient toward the mean of that pool. On a synthetic panel with true τ=2 and strict parallel trends, pre-trends came out ≈ -0.30 (should be 0) and post ≈ +1.72 (should be 2.0). Replaced the Stage-2 regression in event-study mode with direct Borusyak-Jaravel-Spiess-style within-(cohort × relative-time) averaging of the imputed gap. After the fix: pre-trends ≈ +0.01, post ≈ +2.02. Non-event-study single-ATT path was already correct and is unchanged.
24+
- **New family guides**`docs/guides/proximal_family.md` (full Proximal Causal Inference walkthrough covering `sp.proximal`, `sp.fortified_pci`, `sp.bidirectional_pci`, `sp.pci_mtp`, `sp.double_negative_control`, `sp.proximal_surrogate_index`, `sp.select_pci_proxies` with a decision tree + 4 diagnostics every PCI analysis should report), `docs/guides/qte_family.md` (mean → quantile → distribution with cross-section / DiD / IV / panel decision paths across `sp.qte`, `sp.qdid`, `sp.cic`, `sp.distributional_te`, `sp.dist_iv`, `sp.kan_dlate`, `sp.beyond_average_late`, `sp.qte_hd_panel`), `docs/guides/causal_rl_family.md` (when to use causal RL vs classical CI, covering `sp.causal_bandit`, `sp.causal_dqn`, `sp.offline_safe_policy`, `sp.counterfactual_policy_optimization`, `sp.structural_mdp`, `sp.causal_rl_benchmark` + 4 causal-RL-specific sanity checks).
25+
- **Formally shipped from v1.4.1 cherry-picks**`tests/test_bridge_full.py` (10 end-to-end tests for `sp.bridge(kind=...)` bridging theorems) and `docs/guides/bridging_theorems.md`.
26+
27+
Every public signature is byte-for-byte identical to v1.4.1. Upgrading reveals narrower CIs for `dml_model_averaging` and cleaner event-study coefficients for `gardner_did`.
28+
29+
**Previously in v1.4.1 — v3-frontier Sprint 3: AKM shock-clustered SE, Claude extended thinking, parity + integration suites, 2 new guides**
1930

2031
StatsPAI 1.4.1 is an additive follow-up to 1.4.0 that closes the Sprint 3 items:
2132

@@ -981,7 +992,7 @@ pytest
981992
author={Wang, Biaoyue},
982993
year={2026},
983994
url={https://github.com/brycewang-stanford/statspai},
984-
version={1.4.1}
995+
version={1.4.2}
985996
}
986997
```
987998

README_CN.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,18 @@ StatsPAI 是一个**面向 AI Agent** 的 Python 因果推断与应用计量经
1515

1616
它将 R 的 [Causal Inference Task View](https://cran.r-project.org/web/views/CausalInference.html)(fixest、did、rdrobust、gsynth、DoubleML、MatchIt、CausalImpact、sfaR、lme4、oaxaca、ddecompose……)和 Stata 的核心计量命令(`frontier``xtfrontier``mixed``meglm``mixlogit``ivqreg`……),统一到一个一致的 Python API 中。
1717

18-
**🎉 v1.4.1 新版本 — v3 前沿 Sprint 3:AKM 冲击聚类 SE、Claude 扩展思考、对齐与集成测试套件、2 篇新指南**
18+
**🎉 v1.4.2 新版本 — 正确性补丁 + Proximal / QTE / 因果 RL 家族指南**
19+
20+
StatsPAI 1.4.2 是 patch 版本。无破坏性改动、无新增公开签名——只修了两个"悄悄算错"的 bug,补上三篇家族指南,关闭 v3 参考文档和公开文档之间的最后几处缺口。
21+
22+
- **⚠️ 正确性修复 — `sp.dml_model_averaging` 的 √n SE 尺度 bug**:候选间方差聚合器把"样本均值影响函数的外积"当成了 `Var(θ̂_avg)` 本身,漏掉了最后的 `/ n`。报告的 SE 因此比真值大 `√n` 倍;在典型 n=400 DGP 上,95% CI 宽度 4.20(理论 ≈ 0.21),实证覆盖率 100%(名义 95%)。修复后 CI 宽度 0.21,覆盖率回到名义水平。回归守卫加在 `tests/test_dml_model_averaging.py::test_se_on_correct_scale`
23+
- **⚠️ 正确性修复 — `sp.gardner_did` event-study 参照组污染**:Stage-2 dummy 回归把"从未处理单元"和"处在 event-study 视野之外的已处理单元"合并成同一个基线,把每个 event-time 系数都往这个混合基线的均值拖。τ=2 且严格平行趋势的合成面板上,pre-trend ≈ -0.30(应为 0),post ≈ +1.72(应为 2.0)。Event-study 模式下改用 Borusyak-Jaravel-Spiess 风格的 (cohort × relative-time) 分箱直接聚合 imputed gap。修复后 pre-trend ≈ +0.01,post ≈ +2.02。非 event-study 的单 ATT 路径本来就对,保持不变。
24+
- **新增家族指南**`docs/guides/proximal_family.md`(Proximal 因果推断家族完整走查,覆盖 `sp.proximal``sp.fortified_pci``sp.bidirectional_pci``sp.pci_mtp``sp.double_negative_control``sp.proximal_surrogate_index``sp.select_pci_proxies`,含决策树与 PCI 分析必报的 4 项诊断);`docs/guides/qte_family.md`(均值 → 分位数 → 整分布三级粒度,配 cross-section / DiD / IV / 面板四条决策路径,覆盖 `sp.qte``sp.qdid``sp.cic``sp.distributional_te``sp.dist_iv``sp.kan_dlate``sp.beyond_average_late``sp.qte_hd_panel`);`docs/guides/causal_rl_family.md`(何时用 causal RL 而非经典因果推断,覆盖 `sp.causal_bandit``sp.causal_dqn``sp.offline_safe_policy``sp.counterfactual_policy_optimization``sp.structural_mdp``sp.causal_rl_benchmark`,附 4 项 causal-RL 专属 sanity check)。
25+
- **v1.4.1 cherry-pick 的正式发版**`tests/test_bridge_full.py``sp.bridge(kind=...)` 桥梁定理的 10 个端到端测试)与 `docs/guides/bridging_theorems.md`
26+
27+
所有公开签名与 v1.4.1 逐字节一致。升级后唯一可见的变化:`dml_model_averaging` 的 CI 会变窄、`gardner_did` 的 event-study 系数会更干净。
28+
29+
**v1.4.1 — v3 前沿 Sprint 3:AKM 冲击聚类 SE、Claude 扩展思考、对齐与集成测试套件、2 篇新指南**
1930

2031
StatsPAI 1.4.1 在 1.4.0 基础上做增量更新,关闭 Sprint 3 的 4 项工作:
2132

@@ -375,7 +386,7 @@ pytest
375386
author={Wang, Biaoyue},
376387
year={2026},
377388
url={https://github.com/brycewang-stanford/statspai},
378-
version={1.4.1}
389+
version={1.4.2}
379390
}
380391
```
381392

0 commit comments

Comments
 (0)