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 eliminates the "hanging-tail" artefact of the KM estimator and has the same asymptotic properties but differs 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 bisection, are provided in theta_table.csv. 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. For each cell, the repository provides: • Critical values at α ∈ {0.25, 0.10, 0.05, 0.025} (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). • Empirical power at α = 0.05 against six alternative distributions with standard errors (power_W2.csv, power_A2.csv). • Bootstrap-calibrated power using B = 1,999 resamples (power_bootstrap.csv, power_bootstrap_A2.csv). • Exponential censoring rates θ(q) for all nine fractions (theta_table.csv). • Simulation diagnostics including non-convergence counts for the RR estimator (diagnostics_gof.csv). All simulations were performed in Python 3.11 using NumPy 1.24.4, SciPy 1.11.4, and joblib 1.3.2 with N = 10,000 Monte Carlo replications per cell and base seed 42. Results were independently verified with seeds 0, 123, and 999; all critical values agreed to within ±2 standard errors (≤ 0.004).
Files
Steps to reproduce
This document provides instructions for reproducing the complete simulation dataset from scratch using the provided code and data files. Requirements Python 3.11 or later with the following packages (exact versions used in the original simulations are listed in requirements.txt): pip install numpy==1.24.4 scipy==1.11.4 joblib==1.3.2 pandas==2.0.3 matplotlib==3.8.0 Step 1 – Download the repository Download all files from this Mendeley Data record and place them in a single working directory, e.g., GoF_censoring/: GoF_censoring/ ├── simulate_gof.py ├── requirements.txt ├── example_usage.ipynb ├── README.md ├── checksums_sha256.txt └── data/ ├── crit_values_W2_RR.csv ├── crit_values_W2_KM.csv ├── crit_values_A2_RR.csv ├── crit_values_A2_KM.csv ├── actual_size.csv ├── power_W2.csv ├── power_A2.csv ├── power_bootstrap.csv ├── power_bootstrap_A2.csv ├── theta_table.csv └── diagnostics_gof.csv Step 2 – Verify file integrity From the GoF_censoring/ directory, run: sha256sum -c checksums_sha256.txt All entries should return OK. On Windows, use CertUtil -hashfile filename SHA256 and compare manually. Step 3 – Reproduce all simulation tables (~10 hours) python simulate_gof.py --seed 42 --N 10000 --n_jobs -1 Arguments: --seed Base random seed (default: 42). Use 0, 123, or 999 for sensitivity checks. --N Monte Carlo replications per cell (default: 10000). Use 1000 for a quick test. --n_jobs Number of parallel CPU cores (-1 = all available cores). Expected runtime: Approximately 10 hours on an 8-core machine for N = 10000. Quick test run (~6 minutes): python simulate_gof.py --seed 42 --N 1000 --n_jobs -1 Step 4 – Verify reproducibility After the simulation completes, re-run the integrity check. All files should return OK, confirming the regenerated data exactly matches the deposited dataset. To verify seed independence, repeat Step 3 with --seed 0, --seed 123, and --seed 999. All critical values should agree to within ±2 × s.e. (≤ 0.004) for cells with nd_flag = 0. Step 5 – Reproduce bootstrap-calibrated power (~4 hours) python simulate_gof.py --seed 42 --N 10000 --n_jobs -1 --bootstrap --B 1999 Output: power_bootstrap.csv and power_bootstrap_A2.csv in data/. Step 6 – Explore the dataset interactively jupyter notebook example_usage.ipynb The notebook demonstrates: loading critical values, interpolation, comparing new test statistics, plotting power curves, and visualising heatmaps of critical values. Parallel random number generation Independent streams are created using numpy.random.SeedSequence, guaranteeing non-overlapping streams across parallel processes and exact reproducibility regardless of CPU count.
Institutions
- National University of UzbekistanTashkent, Tashkent