SPB Git

spb/wp29_uqo

Public
3.3 KB · 41 lines markdown
1# F2-conf-03 — Coverage of OLS slope CIs in a small heteroskedastic fixed design23## Question4In the fixed-design model y_i = 1 + 0.5 x_i + σ_i ε_i (n = 30, ε_i iid N(0,1), x_i and σ_i from `data/design.csv`), what is the true coverage of nominal 95% intervals β̂ ± t_{0.975}(28)·se for (a) the conventional OLS SE and (b) the HC1 robust SE? Also: (c) the exact SD of β̂, (d) E[se_conv]. Does the conventional interval reach 95%?56## Data and exclusions7`data/design.csv`: 30 rows read, all used, no missing values, all σ_i > 0, index 1–30. No data issues and no exclusions. The design is synthetic. σ_i rises with |x_i| (roughly 0.60 near x = 0, up to 1.79 at x = 1.99), so the error variance is largest at the high-leverage points.89## Method10- I held x and σ fixed and redrew only ε. R = 2000 replications, numpy `default_rng(20261030)`, with all ε drawn at once as a 2000×30 matrix.11- In each replication I fit OLS with an intercept. se_conv = sqrt(s²·[(X'X)⁻¹]₂₂), where s² = RSS/(n−2). se_HC1 = sqrt(n/(n−2) · Σ a_i² e_i²), where a_i is row 2 of (X'X)⁻¹X' and e_i are the OLS residuals. The critical value is t_{0.975}(28) = 2.0484.12- Coverage is the share of replications with |β̂ − 0.5| ≤ t·se.13- Exact SD (no simulation): Var(β̂) = Σ a_i² σ_i², with a_i = (x_i − x̄)/S_xx.14- Undercoverage rule: coverage_conventional < 0.95 − 3·sqrt(0.95·0.05/2000) = 0.95 − 0.0146 = 0.9354.1516## Results17| quantity | value |18|---|---|19| Coverage, conventional interval | **0.844** |20| Coverage, HC1 interval | **0.902** |21| Exact SD of β̂ | 0.2680 |22| Monte Carlo SD of β̂ (ddof=1) | 0.2696 |23| Mean se_conv | 0.1903 |24| Mean se_HC1 (auxiliary) | 0.2408 |25| sqrt(E[s²]·[(X'X)⁻¹]₂₂), exact (auxiliary) | 0.1932 |2627The conventional SE averages 0.190, while the true SD of β̂ is 0.268. That is about 29% too small, because the largest error variances fall at the high-leverage x values. As a result, **the conventional interval does not attain nominal coverage**: 0.844 is far below the 0.9354 threshold (`conventional_ci_undercovers = true`). HC1 helps a lot but still undercovers at 0.902. HC1 is known to be biased downward in small samples with high-leverage points; HC2/HC3 or wild-bootstrap intervals would probably do better, but I did not evaluate them. The Monte Carlo SD agrees with the exact SD (difference 0.0017, within simulation noise), which supports the simulation code.2829## Uncertainty30Binomial Monte Carlo standard errors:31- Conventional coverage: sqrt(p̂(1−p̂)/R) = 0.0081. The approximate 95% MC interval is [0.828, 0.860].32- HC1 coverage: 0.0067. The approximate interval is [0.889, 0.915].33- At the nominal p = 0.95 the standard error is 0.0049, which is the value used in the decision rule.3435Both coverage estimates are many standard errors below 0.95. The standard error of the MC SD is about 0.270/sqrt(2·1999) ≈ 0.004.3637## Limitations and open issues38- The results apply only to this one fixed design and these σ_i, with normal errors. Other seeds will change the coverages within the MC error stated above.39- E[se_conv] is estimated by Monte Carlo and not computed exactly. The auxiliary exact value sqrt(E[s²]·[(X'X)⁻¹]₂₂) = 0.1932 is an upper bound by Jensen's inequality, and it is consistent with the simulated mean of 0.1903.40- I did not evaluate other robust variants (HC2, HC3, bootstrap).41
Files · main
Menu

Theme