Commit 44a552f
Address PR #356 CI review round 10 (1 P1 + 1 P2 + 1 P3)
Balanced-panel eligibility (P1): ContinuousDiD, EfficientDiD,
SyntheticDiD, and HeterogeneousAdoptionDiD all hard-reject unbalanced
panels at fit() time (continuous_did.py:329-338, efficient_did.py:
407-414, synthetic_did.py:399-412, had.py:1173-1188; REGISTRY.md
cross-refs). Guide updates surface this:
- New "Balanced-panel eligibility" block after §3 matrix footnotes
names the four affected estimators and points at
`PanelProfile.is_balanced == True` as the gate. Directs users with
unbalanced panels to `diff_diff.prep.balance_panel()` or to a
balance-tolerant estimator.
- §4 per-estimator bullets for all four estimators prepend or append
the balanced-panel requirement with the specific fit() error the
caller would otherwise hit.
- ContinuousDiD §4.7 bullet now lists THREE eligibility prerequisites
(zero-dose controls, time-invariant dose, balanced panel) where it
previously listed two.
Docstring (P3): profile_panel() docstring notes block updated to
match the binary-only has_always_treated semantics shipped in round
9. The old wording claimed the field fired on "strictly positive
treatment in every observed non-NaN row" across numeric types, which
no longer matches the implementation.
Tests (P2):
- Semantic guide test asserts `is_balanced` is mentioned in the guide
and each of the four balance-sensitive estimators appears within
400 characters of a "balanced" / "is_balanced" marker, so future
edits cannot silently drop the eligibility gate from any of them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f30c121 commit 44a552f
3 files changed
Lines changed: 69 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
263 | 273 | | |
264 | 274 | | |
265 | 275 | | |
| |||
317 | 327 | | |
318 | 328 | | |
319 | 329 | | |
320 | | - | |
| 330 | + | |
| 331 | + | |
321 | 332 | | |
322 | 333 | | |
323 | 334 | | |
| |||
382 | 393 | | |
383 | 394 | | |
384 | 395 | | |
385 | | - | |
| 396 | + | |
386 | 397 | | |
387 | 398 | | |
388 | | - | |
389 | | - | |
390 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
391 | 403 | | |
392 | 404 | | |
393 | 405 | | |
| |||
411 | 423 | | |
412 | 424 | | |
413 | 425 | | |
| 426 | + | |
| 427 | + | |
414 | 428 | | |
415 | 429 | | |
416 | 430 | | |
| |||
426 | 440 | | |
427 | 441 | | |
428 | 442 | | |
429 | | - | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
430 | 446 | | |
431 | 447 | | |
432 | 448 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
202 | 210 | | |
203 | 211 | | |
204 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
627 | 659 | | |
628 | 660 | | |
629 | 661 | | |
| |||
0 commit comments