Contract (P0)
Question. With few clusters, how reliable are cluster-robust 95% CIs for a population mean μ (estimated by the sample mean ȳ of N clustered obs)?
Estimands (per cell G∈{5,10,30} × ICC∈{0,0.2,0.5}, per procedure CR0/CR1/WCB): (a) actual coverage of nominal 95% interval (fraction of R=2000 intervals containing μ=0); (b) for CR0, CR1: relative bias E[V̂]/Var(ȳ), Var(ȳ) exact = [ICC Σn_g² + (1−ICC)N]/N², E[V̂] by MC mean; (c) MC SE of coverage = sqrt(p(1−p)/R); (d) failure regimes: coverage < 0.90. Nominal-consistent: |p−0.95| ≤ 2 MC SE. Assumptions: DGP is Gaussian random-intercept as specified; estimands are meaningful for this DGP only.
Procedures exactly as TASK.md: CR0 (z=1.96), CR1 (G/(G−1) factor, t_{G−1}), WCB (unrestricted Rademacher wild cluster bootstrap-t, B=399, q = 0.95 empirical quantile of |t*|, interval ȳ ± q√V̂_CR1).
Outputs: out/table1.csv (27 rows: estimator, cell_id, G, icc, coverage, mc_se_coverage, rel_bias_var (empty for wcb), mean_ci_halfwidth, R); out/results.json keys task_id, R, B, n_cells, coverage, mc_se_coverage, rel_bias_var, failure_cells, n_failure_cells, nominal_cells, best_procedure_small_G, feasibility, feasibility_reason, data_issues, n_input_rows, n_analysed, random_seed; out/figure1.png; out/report.md (Question; Data and exclusions; Method; Results; Uncertainty; Limitations and open issues); out/analysis.py; out/claims.json.
Information rules: use only data/design.csv; do not change grid, R, B, seeds. Cell seed → numpy default_rng(seed).
Invalidity: changing R/B/grid/seeds; inconsistent design rows (N ≠ Σn_g, len(sizes) ≠ G); non-deterministic output; runtime > 10 min.