{{ message }}
test: add Tutorial 24 drift guard (staggered-vs-collapsed power claims)#549
Merged
Conversation
Pins the two load-bearing quantitative claims in docs/tutorials/24_staggered_vs_collapsed_power.ipynb against estimator-default / simulation drift, closing the deferred Testing/Docs TODO row (branch staggered-analysis-2x2): 1. Monotonic dilution fast -> slow: the collapsed-2x2 reports a monotonically shrinking share of the truth (93.5% / 80.9% / 61.8%) and its CI coverage of the effect-on-treated collapses, while CS stays near nominal. Pinned deterministically (estimands are means of the noise-free true_effect column) so it runs in every CI leg. 2. CS-vs-2x2 MDE crossover / near-parity at slow rollout: the 2x2's MDE climbs (~0.37 -> ~0.60) while CS's barely moves (~0.55) so the power gap closes to parity. Pinned as robust orderings (the exact reversal is simulation-sensitive, per the prose). Structure mirrors the T25 split: deterministic structural pins + a rendered-surface quote cross-check + a notebook-kwargs sync guard run unmarked; the Monte Carlo sweeps (coverage collapse, MDE crossover, flat-vs-growing estimand targeting) are @pytest.mark.slow so they stay off the pure-Python budget and run in the Rust legs (-m '') at full count. Removes the resolved row from TODO.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
a38113b to
805e8c0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
TODO.md.Because
nbsphinx_execute = "never", the committed notebook outputs are what RTD renders, so the prose can silently drift from the live library. These asserts re-derive the load-bearing numbers from the same public generator (generate_staggered_data) + estimators the tutorial uses and check them against the committed surface.Methodology references
DifferenceInDifferences(collapsed 2×2) andCallawaySantAnna(control_group="never_treated")via tutorial-drift checks; no estimator/math/source changes.Validation
tests/test_t24_staggered_vs_collapsed_power_drift.py(9 tests). Structure mirrors the T25 split:E2/E1, exact); a rendered-surface quote cross-check (19 committed numbers); a notebook-kwargs sync guard.@pytest.mark.slow, Rust legs-m ''only — off the ~1h pure-Python budget): dilution coverage collapse; MDE crossover; flat-vs-growing estimand targeting. These assert robust orderings with wide margins, calibrated against real reduced-sim runs (not flaky exact pins).-m '', 6.6s);black --checkandruffclean. Local codex review: ✅ no P0/P1/P2 findings.Security / privacy
🤖 Generated with Claude Code