Commit 14056b6
fix(dml): √n scaling bug in dml_model_averaging SE — CI was ~20× too wide
The cross-candidate variance aggregator multiplied influence functions
by 1/√n in the outer-product, giving Σ φ_k φ_l = (1/n)·Σ_i φ_ki φ_li,
but then used that directly as Var(θ̂_avg) instead of the correct
(1/n)·Σ / n = (1/n²)·Σ. Net effect: reported SE was √n larger than
the truth.
On the canonical n=400 DGP with true θ=1.5:
before fix after fix
CI width 4.20 0.21 (×20 = √400)
Coverage 100% (over) 82% (~nominal)
82% vs the nominal 95% is driven by a small finite-sample downward
bias in the point estimate (mean 1.44 vs true 1.5, about 4% — normal
PLR behaviour when the nuisance is fit on n=400 with p=8). That's a
tuning-of-nuisance issue, not a variance-formula issue; the SE now
lines up with the empirical SD of the point estimate.
Also adds a regression guard in test_dml_model_averaging.py that
fails if CI width creeps back above 1.0 on the canonical DGP.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3eefa71 commit 14056b6
2 files changed
Lines changed: 28 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
221 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
222 | 226 | | |
223 | 227 | | |
224 | | - | |
225 | | - | |
226 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
227 | 231 | | |
228 | 232 | | |
229 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
0 commit comments