Commit a0ff9be
Codex re-review round 5: clear cluster_name on TWFE Conley path
P1 (Maintainability): TWFE drops its auto-unit-cluster on the Conley path
(`_conley_cluster_override = None` in the LinearRegression call) but still
recorded `_twfe_cluster_label = unit` in the result metadata. Downstream
consumers reading `res.cluster_name` or `res.to_dict()["cluster_name"]`
were told the SEs were CR1-clustered when they were actually Conley
spatial HAC with no clustering.
Fix: when `_fit_vcov_type == "conley"`, set `_twfe_cluster_label = None`
so result-level provenance mirrors the actual cluster IDs passed to
LinearRegression.
Regression: `test_twfe_conley_cluster_name_is_none` asserts both
`res.cluster_name is None` and that `to_dict()` doesn't advertise the
`cluster_name` key on a TWFE Conley fit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 2cf5ebe commit a0ff9be
2 files changed
Lines changed: 30 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
564 | | - | |
565 | | - | |
566 | | - | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
567 | 574 | | |
568 | 575 | | |
569 | 576 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1484 | 1484 | | |
1485 | 1485 | | |
1486 | 1486 | | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
1487 | 1507 | | |
1488 | 1508 | | |
1489 | 1509 | | |
| |||
0 commit comments