Commit 31c74fa
Fix remaining review P1s (round 2)
- P1: Only inject cluster as PSU when user explicitly sets cluster=;
weights-only surveys without cluster= now keep implicit per-obs PSUs,
preserving documented df_survey = n_obs - 1 contract.
- P1: Add pweight-only guard in _resolve_survey_for_wooldridge() —
fweight/aweight now raise ValueError matching other pweight-only
estimators (ImputationDiD, TwoStageDiD).
- P1: Add zero-weight safeguards to solve_poisson(weights=...) mirroring
solve_logit's positive-weight validation (rank check on effective
sample, sample-size identification). Skip zero-weight ASF cells in
Poisson survey path.
- P2: Add regression tests for implicit PSU contract, fweight rejection,
and zero-weight Poisson cell handling.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d9cdbf0 commit 31c74fa
3 files changed
Lines changed: 103 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2429 | 2429 | | |
2430 | 2430 | | |
2431 | 2431 | | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
2432 | 2472 | | |
2433 | 2473 | | |
2434 | 2474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
92 | 98 | | |
93 | 99 | | |
94 | 100 | | |
| |||
623 | 629 | | |
624 | 630 | | |
625 | 631 | | |
626 | | - | |
| 632 | + | |
| 633 | + | |
627 | 634 | | |
628 | | - | |
| 635 | + | |
629 | 636 | | |
630 | 637 | | |
631 | 638 | | |
| |||
822 | 829 | | |
823 | 830 | | |
824 | 831 | | |
825 | | - | |
| 832 | + | |
| 833 | + | |
826 | 834 | | |
827 | | - | |
| 835 | + | |
828 | 836 | | |
829 | 837 | | |
830 | 838 | | |
| |||
1054 | 1062 | | |
1055 | 1063 | | |
1056 | 1064 | | |
1057 | | - | |
| 1065 | + | |
| 1066 | + | |
1058 | 1067 | | |
1059 | | - | |
| 1068 | + | |
1060 | 1069 | | |
1061 | 1070 | | |
1062 | 1071 | | |
| |||
1148 | 1157 | | |
1149 | 1158 | | |
1150 | 1159 | | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1151 | 1163 | | |
1152 | 1164 | | |
1153 | 1165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1476 | 1476 | | |
1477 | 1477 | | |
1478 | 1478 | | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
0 commit comments