Commit 2cf5ebe
Codex re-review round 4: propagate vcov_type / conley_lag_cutoff to to_dict
P1 (Maintainability): the prior commit added `conley_lag_cutoff` to the
result dataclasses and summary(), but `DiDResults.to_dict()` and
`MultiPeriodDiDResults.to_dict()` still omitted it. Downstream programmatic
consumers (notebooks, adapters, pipelines) that serialize results to dicts
couldn't tell which Conley variant produced the SEs.
Fix: both `to_dict()` methods now include `vcov_type`, `cluster_name`, and
`conley_lag_cutoff` when set. Conditional emission preserves the existing
behavior for non-conley / non-cluster fits (no new keys appear in the
serialized dict for unrelated estimators).
Regression: `test_twfe_conley_to_dict_carries_lag_cutoff` and
`test_multi_period_did_conley_to_dict_carries_lag_cutoff` fit a TWFE +
MPD Conley panel and assert `to_dict()` exposes the expected fields.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent bcada5c commit 2cf5ebe
2 files changed
Lines changed: 79 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
287 | 295 | | |
288 | 296 | | |
289 | 297 | | |
| |||
717 | 725 | | |
718 | 726 | | |
719 | 727 | | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
720 | 736 | | |
721 | 737 | | |
722 | 738 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1243 | 1243 | | |
1244 | 1244 | | |
1245 | 1245 | | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
1246 | 1291 | | |
1247 | 1292 | | |
1248 | 1293 | | |
| |||
1421 | 1466 | | |
1422 | 1467 | | |
1423 | 1468 | | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
1424 | 1487 | | |
1425 | 1488 | | |
1426 | 1489 | | |
| |||
0 commit comments