twoSurvSampleSizeNI: Sample Size Calculation for Two-Group Non-Inferiority Survival Study
Description
Calculates the required sample size and expected event numbers for a non-inferiority trial with two survival curves,
using piecewise integration of hazard functions under exponential survival assumptions.
Total number of expected events across both groups.
Arguments
syear
Survival time horizon (e.g., median survival time) in years.
yrsurv1
Survival probability of the standard group at syear.
yrsurv2
Survival probability of the test group at syear.
alloc
Allocation ratio (Test / Standard), e.g., 1 means equal allocation.
accrualTime
Duration of patient accrual period.
followTime
Follow-up period after last patient is accrued.
alpha
One-sided significance level (e.g., 0.025).
power
Desired statistical power (e.g., 0.8).
margin
Non-inferiority margin for hazard ratio (HR).
References
Jung SH, Chow SC. (2012). On sample size calculation for comparing survival curves under general hypothesis testing.
Journal of Biopharmaceutical Statistics, 22(3), 485–495.
Web calculator (Non-Inferiority):
https://nshi.jp/en/js/twosurvyrni/