Simulation dataset on critical values and power of Cramér–von Mises and Anderson–Darling goodness-of-fit tests under random right censoring: Kaplan–Meier versus Abdushukurov relative-risk estimator
Description
This dataset contains simulated critical values and empirical power estimates for four goodness-of-fit (GoF) test statistics under random right censoring: the Cramér–von Mises statistic W² and the Anderson–Darling statistic A², each constructed using two nonparametric estimators of the unknown distribution function — the Kaplan–Meier (KM) estimator and the Abdushukurov relative-risk (RR) estimator. The Abdushukurov RR estimator removes the "hanging-tail" artefact of the KM estimator and shares its asymptotic properties, differing in finite samples at high censoring fractions. The null distribution is a three-parameter Weibull (shape = 2, scale = 50, location = 20). Censoring times follow an exponential distribution Exp(θ(q)) with rate θ(q) chosen so that the expected fraction of censored observations equals q ∈ {0.10, 0.20, …, 0.90}. The exact θ(q) values, computed by Brent root-finding on the censoring integral P(X > Y) = ∫ S₀(y) θ e^{−θy} dy, are provided in theta_table.csv, which lists both the target and the achieved q. The dataset covers four sample sizes (n ∈ {20, 60, 80, 100}) and nine censoring fractions (q ∈ {0.10, …, 0.90}), giving 36 experimental cells per statistic. Critical values are upper-tail (1−α) quantiles and therefore increase as α decreases. For each cell, the repository provides: • Critical values at α ∈ {0.25, 0.10, 0.05, 0.025, 0.01} (4 CSV files, one per statistic–estimator combination), with degenerate cells (too few uncensored observations) flagged via nd_flag and encoded NA. • Empirical Type I error verifying the nominal level α = 0.05 (actual_size.csv), evaluated on samples independent of those used for calibration. • Empirical power at α = 0.05 against six alternative distributions with standard errors (power_W2.csv, power_A2.csv), including the achieved censoring fraction under each alternative. • Paired rejection counts with McNemar discordants for power-difference uncertainty (rejection_counts.csv). • Integrated squared bias of the KM vs RR estimator (bias_comparison.csv). • Interpolation-accuracy checks against direct simulation (interpolation_check.csv). • Exponential censoring rates θ(q) for all nine fractions (theta_table.csv). • Exceptional-sample diagnostics, including empirical and theoretical frequencies of all-event (1−q)ⁿ and no-failure qⁿ samples (diagnostics.csv). All simulations were performed in Python 3.11 using NumPy 1.24.4 and SciPy 1.11.4 with N = 10,000 Monte Carlo replications per cell and base seed 42. RNG streams are mapped to fixed (q, n, replication) identifiers so results are reproducible regardless of the number of parallel workers. The critical values were checked for seed stability (seeds 0, 123, 999); the empirical size stays near the nominal 0.05 across cells.
Files
Steps to reproduce
Reproduce the dataset from scratch using the provided code. Requirements Python 3.11+ with packages in code/requirements.txt: pip install -r code/requirements.txt (numpy==1.24.4, scipy==1.11.4) Step 1 — Directory structure CRM_GoF_censoring_data/ ├── README.md, DATA_DICTIONARY.md ├── code/ simulate_gof.py, gen_critvals_staged.py, │ gen_size_power.py, gen_rejection_counts.py, │ gen_interp_check.py, gen_bias_comparison.py, │ requirements.txt └── data/ theta_table.csv, crit_values_{W2,A2}_{KM,RR}.csv, actual_size.csv, power_{W2,A2}.csv, diagnostics.csv, rejection_counts.csv, interpolation_check.csv, bias_comparison.csv, checksums.sha256 Step 2 — Verify integrity From data/: sha256sum -c checksums.sha256 (all OK). Windows: CertUtil -hashfile <file> SHA256. Step 3 — Self-test python code/simulate_gof.py Prints calibration check (theta(0.30)=0.005677→q=0.30) and worked example (W²=0.0561). Step 4 — Critical values + diagnostics (3 q-batches, N=10,000) python code/gen_critvals_staged.py 0 # q=0.10–0.30 python code/gen_critvals_staged.py 3 # q=0.40–0.60 python code/gen_critvals_staged.py 6 # q=0.70–0.90 Writes crit_values_*.csv, diagnostics.csv. Values are upper-tail (1−α) quantiles and increase as α decreases; degenerate cells (q=0.90,n=20) flagged nd_flag=2, extreme quantiles NA. Step 5 — Size and power python code/gen_size_power.py size python code/gen_size_power.py W2 abc python code/gen_size_power.py W2 def python code/gen_size_power.py A2 abc python code/gen_size_power.py A2 def Step 6 — Supporting diagnostics python code/gen_rejection_counts.py # paired + McNemar python code/gen_interp_check.py # interpolation accuracy python code/gen_bias_comparison.py # KM vs RR bias Step 7 — Verify Re-run Step 2 (all OK). For seed-stability, change base seed in scripts (42→0,123,999): empirical size stays near 0.05, valid-cell critical values agree within Monte Carlo error. RNG: streams use numpy.random.default_rng seeded by base + batch index; results are independent of CPU count. Runtime (single CPU, N=10,000): ≈35 min total (critical values ≈9 min, size ≈4 min, power ≈15 min, diagnostics ≈6 min).
Institutions
- National University of UzbekistanTashkent, Tashkent