Sample Size Calculation Using Lakatos Method for Survival Analysis
Source:R/lakatosSampleSize.R
lakatosSampleSize.Rd
Computes the required sample size and expected event numbers for two-group survival analysis using Lakatos' method under exponential survival assumptions and varying weight functions (log-rank, Gehan, Tarone-Ware).
Arguments
- syear
Survival time horizon 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). For equal allocation, use 1.
- accrualTime
Accrual period duration.
- followTime
Additional follow-up time after last patient is accrued.
- alpha
Significance level (e.g., 0.05 for two-sided tests).
- power
Desired statistical power (e.g., 0.8).
- method
Weighting method for test statistic. One of
"logrank"
,"gehan"
, or"tarone-ware"
.- side
Type of test:
"two.sided"
or"one.sided"
.- b
Number of time divisions per year for numerical integration (default = 24).
Value
A list containing:
- Sample_size_of_standard_group
Required sample size in the standard group.
- Sample_size_of_test_group
Required sample size in the test group.
- Total_sample_size
Total sample size.
- Expected_event_numbers_of_standard_group
Expected number of events in the standard group.
- Expected_event_numbers_of_test_group
Expected number of events in the test group.
- Total_expected_event_numbers
Total number of expected events.
- Actual_power
Achieved power given the calculated sample size.
- error
(Optional) Error message when sample size cannot be calculated.
References
Lakatos E. (1988). Sample sizes based on the log-rank statistic in complex clinical trials. Biometrics, 44, 229–241.
Lakatos E, Lan KK. (1992). A comparison of sample size methods for the logrank statistic. Statistics in Medicine, 11(2), 179–191.
Web calculator (Superiority): https://nshi.jp/en/js/twosurvyr/
Examples
lakatosSampleSize(
syear = 2,
yrsurv1 = 0.7,
yrsurv2 = 0.6,
alloc = 1,
accrualTime = 1,
followTime = 1,
alpha = 0.05,
power = 0.8,
method = "logrank",
side = "two.sided"
)
#> $Sample_size_of_standard_group
#> [1] 446
#>
#> $Sample_size_of_test_group
#> [1] 446
#>
#> $Total_sample_size
#> [1] 892
#>
#> $Expected_event_numbers_of_standard_group
#> [1] 104.7
#>
#> $Expected_event_numbers_of_test_group
#> [1] 141.8
#>
#> $Total_expected_event_numbers
#> [1] 246.5
#>
#> $Actual_power
#> [1] 0.8
#>