Learn R Programming

rashnu (version 0.1.2)

lakatosSampleSize: Sample Size Calculation Using Lakatos Method for Survival Analysis

Description

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).

Usage

lakatosSampleSize(
  syear,
  yrsurv1,
  yrsurv2,
  alloc,
  accrualTime,
  followTime,
  alpha,
  power,
  method = c("logrank", "gehan", "tarone-ware"),
  side = c("two.sided", "one.sided"),
  b = 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.

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).

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

Run this code
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"
)


Run the code above in your browser using DataLab