SPB Git

spb/wp29_uqo

Public

# F2-conf-03 — Coverage of OLS slope CIs in a small heteroskedastic fixed design

# Question

In the fixed design y_i = 1 + 0.5 x_i + σ_i ε_i (n = 30, x_i and σ_i from data/design.csv, ε_i iid N(0,1)), do nominal 95% intervals β̂ ± t_{0.975}(28)·se reach 95% coverage when se is (a) the conventional OLS SE or (b) the HC1 robust SE? Two more targets: (c) the exact SD of β̂ and (d) E[se_conv].

# Data and exclusions

I read one file, data/design.csv: 30 rows, columns i, x, sigma (n_input_rows). It has no missing values or duplicates, and every σ is positive. Its SHA-256 matches the bundle manifest (see out/state/data_audit.md). I excluded nothing (out/exclusions.csv: 30 → 30) and found no data issues (data_issues = []). σ_i is largest at the extreme values of x, i.e. at the high-leverage points.

# Method

  • Exact SD of β̂: β̂ − β = Σ w_i σ_i ε_i with w_i = (x_i − x̄)/Sxx. So SD(β̂) = sqrt(Σ w_i² σ_i²). This is exact because the design is fixed.
  • Simulation: R = 2000 replications (n_replications) of n = 30 (n_obs_per_replication). Only ε is redrawn, using numpy default_rng (PCG64) with seed 20261030 (random_seed).
  • SEs and intervals: In each replication I fit OLS and compute two SEs. se_conv = sqrt(s²·[(X'X)⁻¹]₂₂) with s² = RSS/28. se_HC1 = sqrt(n/(n−2) · Σ w_i² e_i²), i.e. the HC0 sandwich slope element times 30/28. The critical value is t_{0.975}(28) = 2.0484 (t_critical_28).
  • Coverage: the share of replications with |β̂ − 0.5| ≤ t·se.
  • Undercoverage rule: the conventional interval is flagged as undercovering if its coverage is below 0.95 − 3·sqrt(0.95·0.05/2000) = 0.9354 (undercoverage_threshold). The binomial SE in this rule is evaluated at the nominal p = 0.95; that choice is documented here.
  • Code: out/analysis.py regenerates every number.

# Results

quantity value key
Coverage, conventional interval 0.844 coverage_conventional
Coverage, HC1 interval 0.902 coverage_hc1
Exact SD of β̂ 0.2680 sd_beta_exact
MC SD of β̂ (ddof 1) 0.2696 sd_beta_mc
Mean se_conv 0.1903 mean_se_conventional
Mean se_HC1 (supplementary) 0.2408 mean_se_hc1
Conventional interval undercovers? true conventional_ci_undercovers

The conventional interval does not reach its nominal 95% coverage. Its estimated coverage of 0.844 is far below the 0.9354 threshold (coverage_conventional, undercoverage_threshold). The reason is that se_conv averages 0.190 (mean_se_conventional), while the true SD of β̂ is 0.268 (sd_beta_exact). The conventional SE assumes equal error variances, so it understates the variance here, where the large-variance errors fall at high-leverage x values. The HC1 interval does better at 0.902 (coverage_hc1) but still falls short of 0.95. This is consistent with the known downward bias and extra variability of HC0/HC1 standard errors when n is small and leverage is high. The MC SD agrees with the exact SD (difference ≈ 0.4 sampling SEs; out/state/checks.md).

# Uncertainty

  • Conventional coverage: binomial MC SE sqrt(p̂(1−p̂)/R) = 0.0081 (mcse_coverage_conventional). Approximate 95% MC interval 0.828–0.860.
  • HC1 coverage: MC SE 0.0066 (mcse_coverage_hc1). Approximate 95% MC interval 0.889–0.915.
  • Binomial SE at the nominal level: 0.0049 (mcse_binomial_nominal).
  • How decisive the results are: the conventional estimate is about 21 nominal SEs below 0.95. The HC1 estimate is also more than 9 SEs below 0.95, so neither shortfall is plausibly Monte Carlo noise.
  • Exact quantities: sd_beta_exact carries no simulation uncertainty.

# Limitations and open issues

  • The results hold only for this synthetic fixed design, with normal errors and n = 30. Coverage depends on the specific pattern of σ against leverage.
  • The MC estimates depend on the seed. Another seed would change them within roughly the MC SEs reported above.
  • I did not evaluate HC2/HC3 or wild-bootstrap intervals; the task does not require them. So I make no claim about which robust method would reach 95%.
  • The binomial SE in the undercoverage rule uses p = 0.95. Using p̂ instead (0.0081) gives the same conclusion.
  • No data issues or blocked steps; the task is complete (feasibility = "complete").
Files · main
Menu

Theme