Commit e03318d
Codex CI R5 P0: thread raw data (not working_data) on MPD Conley path
P0 Methodology [new in R5] — `MultiPeriodDiD.fit` built
`_conley_coords_arr` / `_conley_time_arr` / `_conley_unit_arr` from
`working_data`, which is absorb-demeaned. If a caller listed any of
those columns (coords, time, or unit) in `absorb`, the Conley helper
would silently partition the within-period spatial sandwich on
residualized values instead of the true geography/period labels and
misstate Conley SEs.
This is the same raw-data contract the local R1 fix established for
DifferenceInDifferences (`estimators.py:L538-L561`); MultiPeriodDiD
shared the same pattern but wasn't updated in that pass — codex CI R5
caught the holistic-fix omission.
Now reads from `data` in MPD, mirroring DiD + TWFE
(`twfe.py:L370-L371`). FWL composability holds: the meat is computed
on demeaned scores but the kernel grid uses raw coords + time/unit.
Adds `test_mpd_conley_with_absorb_uses_raw_coords_and_time` regression:
monkeypatches `_compute_conley_vcov` to capture the time + coords args,
asserts the helper sees raw integer time labels (0..T-1, not absorb-
demeaned floats) AND n_units distinct (lat, lon) pairs (not collapsed
to one demeaned mean per unit).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 484620e commit e03318d
2 files changed
Lines changed: 101 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1666 | 1666 | | |
1667 | 1667 | | |
1668 | 1668 | | |
1669 | | - | |
1670 | | - | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
1671 | 1680 | | |
1672 | 1681 | | |
1673 | 1682 | | |
1674 | | - | |
1675 | | - | |
| 1683 | + | |
| 1684 | + | |
1676 | 1685 | | |
1677 | 1686 | | |
1678 | 1687 | | |
1679 | 1688 | | |
1680 | 1689 | | |
1681 | 1690 | | |
1682 | | - | |
1683 | | - | |
| 1691 | + | |
| 1692 | + | |
1684 | 1693 | | |
1685 | 1694 | | |
1686 | 1695 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1291 | 1291 | | |
1292 | 1292 | | |
1293 | 1293 | | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
1294 | 1380 | | |
1295 | 1381 | | |
1296 | 1382 | | |
| |||
0 commit comments