Skip to content

Commit f3d5d92

Browse files
igerberclaude
andcommitted
Include "conley" in DiD/MultiPeriodDiD vcov_type enum docstrings
Address P3 documentation finding from CI Codex review of PR #411 R-post-rebase. The leading `vcov_type` enum lists on `DifferenceInDifferences` and `MultiPeriodDiD` only enumerated `{"classical", "hc1", "hc2", "hc2_bm"}`, omitting `"conley"` even though the constructor accepts it (sklearn-style API symmetry — the rejection happens at fit-time, not __init__). The fit-time rejection note already existed below the enum; this just adds `"conley"` to the bracketed list and folds the rejection text into the new bullet so generated docs / IDE help surface the complete public API. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e4f1399 commit f3d5d92

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

diff_diff/estimators.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class DifferenceInDifferences:
5757
``vcov_type``: with ``"hc1"`` dispatches to CR1 (Liang-Zeger); with
5858
``"hc2_bm"`` dispatches to CR2 Bell-McCaffrey (Pustejovsky-Tipton 2018
5959
symmetric-sqrt + Satterthwaite DOF).
60-
vcov_type : {"classical", "hc1", "hc2", "hc2_bm"}, optional
60+
vcov_type : {"classical", "hc1", "hc2", "hc2_bm", "conley"}, optional
6161
Variance-covariance family. Defaults to the ``robust`` alias.
6262
6363
- ``"classical"``: non-robust OLS SEs, ``sigma_hat^2 * (X'X)^{-1}``.
@@ -69,15 +69,15 @@ class DifferenceInDifferences:
6969
with ``cluster=``, Pustejovsky-Tipton (2018) CR2 cluster-robust.
7070
(Note: ``MultiPeriodDiD`` does NOT yet support ``cluster=`` with
7171
``"hc2_bm"`` — see ``MultiPeriodDiD`` docstring and REGISTRY.md.)
72-
73-
``vcov_type="conley"`` (Conley 1999 spatial-HAC) is **rejected** at
74-
fit-time on ``DifferenceInDifferences`` in Phase 1 because DiD is
75-
intrinsically a two-period panel design, and Phase 1's cross-
76-
sectional Conley does not handle the time dimension. The supported
77-
Phase 1 path for Conley is direct ``compute_robust_vcov`` /
78-
``LinearRegression`` on a single-period regression. Phase 2 will
79-
add the space-time product kernel (Driscoll-Kraay) and lift the
80-
rejection.
72+
- ``"conley"``: Conley 1999 spatial-HAC sandwich. **Accepted by the
73+
constructor for sklearn-style API symmetry but rejected at
74+
fit-time on ``DifferenceInDifferences``** because DiD is
75+
intrinsically a two-period panel design, and Phase 1's cross-
76+
sectional Conley does not handle the time dimension. The
77+
supported Phase 1 path for Conley is direct
78+
``compute_robust_vcov`` / ``LinearRegression`` on a single-period
79+
regression. Phase 2 will add the space-time product kernel
80+
(Driscoll-Kraay) and lift the rejection.
8181
alpha : float, default=0.05
8282
Significance level for confidence intervals.
8383
inference : str, default="analytical"
@@ -1022,7 +1022,7 @@ class MultiPeriodDiD(DifferenceInDifferences):
10221022
``TODO.md``; also documented as a Note in
10231023
``docs/methodology/REGISTRY.md`` under the HeterogeneousAdoptionDiD
10241024
requirements-checklist block.
1025-
vcov_type : {"classical", "hc1", "hc2", "hc2_bm"}, optional
1025+
vcov_type : {"classical", "hc1", "hc2", "hc2_bm", "conley"}, optional
10261026
Variance-covariance family. Defaults to the ``robust`` alias.
10271027
10281028
- ``"classical"``: non-robust OLS SEs, ``sigma_hat^2 * (X'X)^{-1}``.
@@ -1033,15 +1033,15 @@ class MultiPeriodDiD(DifferenceInDifferences):
10331033
- ``"hc2_bm"``: one-way HC2 + Imbens-Kolesar (2016) Satterthwaite DOF
10341034
per coefficient plus a contrast-aware DOF for the post-period-average
10351035
ATT. **Unsupported with** ``cluster=`` — see ``cluster`` above.
1036-
1037-
``vcov_type="conley"`` (Conley 1999 spatial-HAC) is **rejected** at
1038-
fit-time on ``MultiPeriodDiD`` in Phase 1 because MultiPeriodDiD is
1039-
intrinsically a multi-period panel estimator and Phase 1's cross-
1040-
sectional Conley does not handle the time dimension. The supported
1041-
Phase 1 path for Conley is direct ``compute_robust_vcov`` /
1042-
``LinearRegression`` on a single-period regression. Phase 2 will
1043-
add the space-time product kernel (Driscoll-Kraay) and lift the
1044-
rejection.
1036+
- ``"conley"``: Conley 1999 spatial-HAC sandwich. **Accepted by the
1037+
constructor for sklearn-style API symmetry but rejected at
1038+
fit-time on ``MultiPeriodDiD``** because MultiPeriodDiD is
1039+
intrinsically a multi-period panel estimator and Phase 1's
1040+
cross-sectional Conley does not handle the time dimension. The
1041+
supported Phase 1 path for Conley is direct
1042+
``compute_robust_vcov`` / ``LinearRegression`` on a single-period
1043+
regression. Phase 2 will add the space-time product kernel
1044+
(Driscoll-Kraay) and lift the rejection.
10451045
alpha : float, default=0.05
10461046
Significance level for confidence intervals.
10471047
conley_coords, conley_cutoff_km, conley_metric, conley_kernel

0 commit comments

Comments
 (0)