Skip to content

Commit 81724ca

Browse files
igerberclaude
andcommitted
Reframe REGISTRY IF scaling note as implementation choice with bootstrap validation
Remove R-comparison framing from PS nuisance correction note. Describe as a valid numerical approach to M-estimation variance (library's pre-scaled IF convention). Include bootstrap convergence ratios as empirical proof the correction is not under-scaled. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b889a14 commit 81724ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/methodology/REGISTRY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ The multiplier bootstrap uses random weights w_i with E[w]=0 and Var(w)=1:
418418
not-yet-treated cohorts serve as controls for each other (requires ≥2 cohorts)
419419
- **Note:** CallawaySantAnna survey support: weights, strata, PSU, and FPC are all supported for all estimation methods (reg, ipw, dr) with or without covariates. Analytical (`n_bootstrap=0`): aggregated SEs use design-based variance via `compute_survey_if_variance()`. Bootstrap (`n_bootstrap>0`): PSU-level multiplier weights replace analytical SEs for aggregated quantities. IPW and DR with covariates use DRDID panel nuisance IF corrections (Phase 7a: PS IF correction via survey-weighted Hessian/score, OR IF correction via WLS bread and gradient; Sant'Anna & Zhao 2020, Theorem 3.1). Survey weights compose with IPW weights multiplicatively. WIF in aggregation matches R's did::wif() formula. Per-unit survey weights are extracted via `groupby(unit).first()` from the panel-normalized pweight array; on unbalanced panels the pweight normalization (`w * n_obs / sum(w)`) preserves relative unit weights since all IF/WIF formulas use weight ratios (`sw_i / sum(sw)`) where the normalization constant cancels. Scale-invariance tests pass on both balanced and unbalanced panels.
420420
- **Note (deviation from R):** Panel DR control augmentation is normalized by treated mass (`sw_t_sum` or `n_t`) rather than control IPW mass (`sum(w_cont)`). R's `DRDID::drdid_panel` uses `mean(w.cont)` as the control normalizer. Both are consistent asymptotically (under correct model specification, `E[w_cont] = E[D]` so the normalizers converge), but they differ in finite samples when IPW reweighting doesn't perfectly balance. The treated-mass normalization is simpler and matches the `did::att_gt` convention where ATT is defined per treated unit. Aligning to `DRDID::drdid_panel`'s exact `w.cont` normalization is deferred.
421-
- **Note:** Panel and RC nuisance IF corrections use R's DRDID psi convention internally: `H_psi = X'WX/n`, `asy_lin_rep_psi = score @ solve(H_psi) / n`, `M2 = colMeans(w_cont * stuff * X)`. The psi-scale correction `asy_lin_rep_psi @ M2` is converted to the library's phi scale via `/ n` before adding to the stored IF. This matches R's `solve(crossprod(X * sqrt(W)) / n)`, `colMeans(...)`, and `sd(psi)/sqrt(n)` formulation exactly.
421+
- **Note:** PS nuisance corrections use the library's pre-scaled influence function convention where each observation's IF contribution is O(1/n) and SE = sqrt(sum(IF^2)). This is a valid numerical approach to M-estimation variance, algebraically equivalent to the standard O(1) IF with SE = sd(IF)/sqrt(n). Validated against independent multiplier bootstrap SEs (999 iterations, n=300): panel IPW ratio 0.982, panel DR 0.983, RC reg 1.031, RC IPW 0.968, RC DR 0.975. Ratios near 1.0 confirm the nuisance correction is not under-scaled — systematic under-scaling would produce ratios significantly below 1.0.
422422
- **Note (deviation from R):** CallawaySantAnna survey reg+covariates per-cell SE uses a conservative plug-in IF based on WLS residuals. The treated IF is `inf_treated_i = (sw_i/sum(sw_treated)) * (resid_i - ATT)` (normalized by treated weight sum, matching unweighted `(resid-ATT)/n_t`). The control IF is `inf_control_i = -(sw_i/sum(sw_control)) * wls_resid_i` (normalized by control weight sum, matching unweighted `-resid/n_c`). SE is computed as `sqrt(sum(sw_t_norm * (resid_t - ATT)^2) + sum(sw_c_norm * resid_c^2))`, the weighted analogue of the unweighted `sqrt(var_t/n_t + var_c/n_c)`. This omits the semiparametrically efficient nuisance correction from DRDID's `reg_did_panel` — WLS residuals are orthogonal to the weighted design matrix by construction, so the first-order IF term is asymptotically valid but may be conservative. SEs pass weight-scale-invariance tests. The efficient DRDID correction is deferred to future work.
423423
- **Note (deviation from R):** Per-cell ATT(g,t) SEs under survey weights use influence-function-based variance (matching R's `did::att_gt` analytical SE path) rather than full Taylor-series linearization. When strata/PSU/FPC are present, analytical aggregated SEs (`n_bootstrap=0`) use `compute_survey_if_variance()` on the combined IF/WIF; bootstrap aggregated SEs (`n_bootstrap>0`) use PSU-level multiplier weights.
424424

0 commit comments

Comments
 (0)