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
Add automatic cohort × covariate (D_g × X) and time × covariate (f_t × X)
interaction blocks to the ETWFE design matrix, completing the W2025 Eq. 5.3
specification. Previously only cell × demeaned-X and raw X were included,
silently fitting a restricted model.
D_g × X auto-generated for exovar/xtvar (xgvar already has these in
_prepare_covariates). f_t × X generated for all covariates, drop first
time period for identification. ASF and delta-method gradient code unchanged
— new blocks are nuisance parameters not zeroed in the counterfactual.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/methodology/REGISTRY.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1136,7 +1136,7 @@ where `g(·)` is the link inverse (logistic or exp), `η_i` is the individual li
1136
1136
-`exovar`: Time-invariant covariates, added without demeaning (corresponds to W2025 Eq. 5.2 `x_i`)
1137
1137
-`xtvar`: Time-varying covariates, demeaned within cohort×period cells when `demean_covariates=True` (corresponds to W2025 Eq. 10.2 `x_hat_itgs = x_it - x_bar_gs`)
1138
1138
-`xgvar`: Covariates interacted with each cohort indicator
1139
-
-**Note:**Covariates are included as both main effects and treatment × demeaned-covariate interactions (W2025 Eq. 5.3), allowing ATT to vary with covariates within each (g,t) cell.
1139
+
-**Note:**Covariate-adjusted ETWFE includes the full W2025 Eq. 5.3 basis: raw X, cohort × X (D_g × X for treated cohorts, auto-generated for `exovar`/`xtvar`), time × X (f_t × X, drop first period), and cell × demeaned X (D_{g,t} × X̃). Variables in `xgvar` already contribute D_g × X via `_prepare_covariates`; `exovar`/`xtvar` get automatic D_g × X generation.
1140
1140
-**Note:**`xtvar` demeaning operates at the cohort×period level (W2025 Eq. 10.2), not the cohort level (W2025 Eq. 5.2). These are identical for time-constant covariates but differ for time-varying covariates.
0 commit comments