View source: R/lakatosSampleSize.R
lakatosSampleSize | R Documentation |
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).
lakatosSampleSize(
syear,
yrsurv1,
yrsurv2,
alloc,
accrualTime,
followTime,
alpha,
power,
method = c("logrank", "gehan", "tarone-ware"),
side = c("two.sided", "one.sided"),
b = 24
)
syear |
Survival time horizon in years. |
yrsurv1 |
Survival probability of the standard group at |
yrsurv2 |
Survival probability of the test group at |
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 |
side |
Type of test: |
b |
Number of time divisions per year for numerical integration (default = 24). |
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.
Achieved power given the calculated sample size.
(Optional) Error message when sample size cannot be calculated.
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/
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"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.