You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For staggered LWDiD paths outside the composite-regression gate, _aggregate_cohort_effects() computes the overall standard error as a weighted sum of marginal cohort variances under an independence assumption. Cohorts can share control units, so their estimates need not be independent.
This is distinct from #733. That issue ensures aggregate(\"overall\") no longer replaces the inference produced by fit(). This issue concerns the statistical validity and provenance of the inference that fit() itself produces on the non-composite paths.
Evidence
On a fixed, staggered, never-treated synthetic panel with rolling=\"demean\", estimator=\"ra\", and vce=\"hc1\":
The design uses three treated cohorts that share never-treated controls. A unit-cluster bootstrap is materially wider, consistent with positive cross-cohort covariance omitted by the current delta calculation.
# SE via delta method (assuming independence across cohorts)
# Var(weighted_avg) = sum(w_g^2 * se_g^2)
valid_ses=np.isfinite(ses) & (ses>0)
ifvalid_ses.all():
var_att=float(np.sum(weights**2*ses**2))
se=float(np.sqrt(var_att))
else:
Proposed direction
Retain a joint covariance or influence-function representation for cohort effects and use it for overall aggregation.
Surface an explicit inference provenance field, for example composite_joint or cohort_independence_delta, in result serialisation and summaries.
Add a deterministic unit-cluster-bootstrap concordance test for the non-composite staggered path. Until covariance-aware inference is implemented, the test is expected to fail and documents the required target.
Acceptance criteria
Overall staggered inference accounts for covariance among cohort effects that share controls.
Result metadata identifies the inference basis.
The bootstrap-concordance test passes without an xfail marker.
Summary
For staggered LWDiD paths outside the composite-regression gate,
_aggregate_cohort_effects()computes the overall standard error as a weighted sum of marginal cohort variances under an independence assumption. Cohorts can share control units, so their estimates need not be independent.This is distinct from #733. That issue ensures
aggregate(\"overall\")no longer replaces the inference produced byfit(). This issue concerns the statistical validity and provenance of the inference thatfit()itself produces on the non-composite paths.Evidence
On a fixed, staggered, never-treated synthetic panel with
rolling=\"demean\",estimator=\"ra\", andvce=\"hc1\":The design uses three treated cohorts that share never-treated controls. A unit-cluster bootstrap is materially wider, consistent with positive cross-cohort covariance omitted by the current delta calculation.
Relevant implementation:
diff-diff/diff_diff/lwdid.py
Lines 1619 to 1625 in c2694ff
Proposed direction
composite_jointorcohort_independence_delta, in result serialisation and summaries.Acceptance criteria