View source: R/twoSurvSampleSizeNI.R
twoSurvSampleSizeNI | R Documentation |
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.
twoSurvSampleSizeNI(
syear,
yrsurv1,
yrsurv2,
alloc,
accrualTime,
followTime,
alpha,
power,
margin
)
syear |
Survival time horizon (e.g., median survival time) in years. |
yrsurv1 |
Survival probability of the standard group at |
yrsurv2 |
Survival probability of the test group at |
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). |
A list containing:
Required sample size in the standard group.
Required sample size in the test group.
Total sample size.
Expected number of events in the standard group.
Expected number of events in the test group.
Total number of expected events across both groups.
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/
twoSurvSampleSizeNI(
syear = 2,
yrsurv1 = 0.7,
yrsurv2 = 0.65,
alloc = 1,
accrualTime = 1,
followTime = 1,
alpha = 0.025,
power = 0.8,
margin = 1.3
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.