The SampleSizeSingleArmSurvival
package provides a
method for calculating sample sizes for single-arm survival studies
using the arcsine transformation. This approach accounts for uniform
accrual and exponential survival assumptions, leveraging the work of
Nagashima et al. (2021).
This vignette demonstrates how to use the
calcSampleSizeArcsine()
function to calculate the required
sample size based on specific survival probabilities, time points, and
study designs.
The most basic use case calculates the sample size required when you specify the null and alternative survival probabilities:
library(SampleSizeSingleArmSurvival)
<- calcSampleSizeArcsine(S0 = 0.90, S1 = 0.96)
required_sample
required_sample#> [1] 107
C:1r2x6b047daa62ac.R
Here, S0
represents the survival probability under the
null hypothesis, and S1
is the survival probability under
the alternative hypothesis.
You can adjust the study parameters to reflect different study designs, such as longer accrual periods or different time points of interest:
<- calcSampleSizeArcsine(
custom_sample S0 = 0.80,
S1 = 0.85,
accrual = 36,
followup = 24,
timePoint = 18
)
custom_sample#> [1] 356
C:1r2x6b047daa62ac.R
This example calculates the required sample size for a study with an accrual period of 36 months, an additional follow-up period of 12 months, and a time point of interest at 24 months.
The function will provide warnings if parameters result in non-positive or zero effect sizes, or if the time point of interest exceeds the study duration:
<- calcSampleSizeArcsine(S0 = 0.90, S1 = 0.90)
result #> Warning in calcSampleSizeArcsine(S0 = 0.9, S1 = 0.9): S1 <= S0: effect size is
#> non-positive or zero. Returning NA.
C:1r2x6b047daa62ac.R
Warnings like these are meant to guide you in adjusting your parameters.
The method uses the arcsine transformation of survival probabilities to stabilize the variance and simplify comparisons between groups. Specifically:
S(t) = exp(-lambda * t)
).uniroot
function.The arcsine transformation is particularly useful for stabilizing variance when survival probabilities are near 0 or 1.
Nagashima, K., & colleagues (2021). Sample size calculations for single-arm survival studies using transformations of the Kaplan–Meier estimator. Pharmaceutical Statistics, 20(2), 228–241. https://onlinelibrary.wiley.com/doi/10.1002/pst.2090
The SampleSizeSingleArmSurvival
package offers a robust
tool for calculating sample sizes for single-arm survival studies,
accommodating various study designs and assumptions.