Simulation code for “Cause-specific operational information for sample-size planning and adaptive stopping in competing-risks studies under hybrid Type-I censoring”

Published: 4 November 2026| Version 1 | DOI: 10.17632/5wpr4zkdjn.1
Contributor:

Description

This deposit contains the complete Python simulation code that reproduces every simulated table in the article “Cause-specific operational information for sample-size planning and adaptive stopping in competing-risks studies under hybrid Type-I censoring: a simulation study for the exponential and Weibull families” (Communications in Statistics – Simulation and Computation). The code studies sample-size planning for parametric competing-risks studies under the hybrid Type-I censoring rule τ = min(X₍ᵣ₎, T₀). It implements: (i) verification of the operational-information variance formula for the two-cause exponential model; (ii) censoring-corrected precision and detection planning, across the Type-II-boundary, genuinely hybrid, and horizon-binding regimes; (iii) a conservative adaptive procedure with geometric sample growth and plug-in stopping; (iv) the two-cause Weibull model, demonstrating that with unequal shapes the operational information is cause-specific and the single-β correction fails; and (v) robustness to inter-risk dependence via a Clayton copula. Four scripts (sim_planning.py, sim_v2.py, sim_weibull.py) plus a driver (run_all.py) regenerate all tables. All randomness uses numpy’s PCG64 generator with fixed seeds, so the results are bit-for-bit reproducible. Requires Python 3.13, numpy 2.5, scipy 1.18.

Files

Steps to reproduce

Install the dependencies: pip install -r requirements.txt (Python 3.13, numpy 2.5, scipy 1.18). To regenerate every simulated table in one run: python3 run_all.py. To reproduce a single table, run the matching command: Table 2 (variance check): python3 sim_planning.py 0 Table 4 (precision planning, exponential): python3 sim_planning.py 1 Table 9 (inter-risk dependence): python3 sim_planning.py 3 Table 3 (finite-T₀ hybrid, three regimes): python3 sim_v2.py A Table 5 (precision away from the Type-II boundary): python3 sim_v2.py C Tables 7 and 8 (adaptive procedure): python3 sim_v2.py B Table 6 (Weibull): python3 sim_weibull.py 1 and python3 sim_weibull.py 2 Each script prints the table rows to the console. Seeds are fixed inside the scripts (listed in README.md), so the numbers match the manuscript exactly. Table 1 is analytic (Equation 7) and is not simulated.

Institutions

Categories

Statistics, Computing

Licence