# Simulation for Group Sequential Trials

#### 12/15/2021

This R Markdown document illustrates the simulation tool for group sequential survival trials. This is useful for validating the analytic calculation, which might be inaccurate when the allocation ratio is not 1:1 or the hazard ratio is far from 1.

library(lrstat)

Consider a three-stage O’Brien-Fleming group sequential design with two interim looks conducted at 50% and 75% of the target total number of events. The first interim is for futility only, and the second interim is for efficacy only. The hazard rate of the control group is 0.95 per year. The hazard ratio of the experimental group to the control group is 0.3. The experimental versus control group randomization ratio is 3:1. The enrollment rate is 5 patients per month. The 2-year drop-out rate is 10%. The study uses a fixed follow-up design and each patient is to be followed up for 26 weeks. If we use an enrollment duration of 32 months, then the maximum number of events is expected to be 32.8.

lrstat(time=c(20,25,30,35,38.5), allocationRatioPlanned = 3,
accrualIntensity = 5,
lambda2 = 0.95/12, lambda1 = 0.3*0.95/12,
gamma1 = -log(1-0.1)/24, gamma2 = -log(1-0.1)/24,
accrualDuration = 32, followupTime = 6.5, fixedFollowup = TRUE)
##   stratum time subjects  nevents nevents1  nevents2    uscore   vscore
## 1       1 20.0      100 17.37244  8.91394  8.458504 -4.598872 2.996796
## 2       1 25.0      125 22.49924 11.55918 10.940058 -5.951438 3.875556
## 3       1 30.0      150 27.62603 14.20442 13.421612 -7.304005 4.754316
## 4       1 35.0      160 31.95277 16.45992 15.492843 -8.438436 5.487095
## 5       1 38.5      160 32.81148 16.92953 15.881948 -8.656427 5.624064
##    logRankZ logRankHR
## 1 -2.656579 0.2155427
## 2 -3.023117 0.2153190
## 3 -3.349786 0.2151781
## 4 -3.602390 0.2148383
## 5 -3.650174 0.2145577

Suppose we run the trial for a target maximum number of 32 events. The trial will stop once 32 events have been observed or the trial is stopped early for futility or efficacy. Due to the fixed follow-up design, there might be situations where a total of 160 patients with each followed-up for 6.5 month do not yield 32 events, in which case, the trial will stop and we can use the Cui, Huang and Wang (CHW) method to account for the maximum information being less than the planned. The simulation below demonstrates that the study has the target power of 90% under the alternative hypothesis.

lrsim(kMax = 3, informationTime = c(0.5, 0.75, 1),
criticalValues = c(Inf, 2.34, 2.012),
futilityBounds = c(0.282, -Inf),
allocation1 = 3, allocation2 = 1,
accrualTime = 0, accrualIntensity = 5,
piecewiseSurvivalTime = 0,
stratumFraction = 1,
lambda1 = 0.3*0.95/12, lambda2 = 0.95/12,
gamma1 = -log(1-0.1)/24, gamma2 = -log(1-0.1)/24,
accrualDuration = 34, followupTime = 6.5,
fixedFollowup = TRUE,
rho1 = 0, rho2 = 0,
plannedEvents = c(16, 24, 32),
maxNumberOfIterations = 1000,
maxNumberOfRawDatasetsPerStage = 0,
seed = 12345)
##                          stage 1 stage 2 stage 3
## cumulativeRejection        0.000   0.735   0.901
## cumulativeFutility         0.032   0.035   0.099
## numberOfEvents            16.000  23.983  31.413
## numberOfSubjects          93.180 132.366 159.465
## analysisTime              18.641  26.580  33.080
## overallReject              0.901
## expectedNumberOfEvents    25.433
## expectedNumberOfSubjects 138.141
## expectedStudyDuration     27.965

The simulation below shows that the probability of futility stopping under the null hypothesis is 62%.

lrsim(kMax = 3, informationTime = c(0.5, 0.75, 1),
criticalValues = c(100, 2.34, 2.012),
futilityBounds = c(0.282, -100),
allocation1 = 3, allocation2 = 1,
accrualTime = 0, accrualIntensity = 5,
piecewiseSurvivalTime = 0,
stratumFraction = 1,
lambda1 = 0.95/12, lambda2 = 0.95/12,
gamma1 = -log(1-0.1)/24, gamma2 = -log(1-0.1)/24,
accrualDuration = 34, followupTime = 6.5,
fixedFollowup = TRUE,
rho1 = 0, rho2 = 0,
plannedEvents = c(16, 24, 32),
maxNumberOfIterations = 1000,
maxNumberOfRawDatasetsPerStage = 0,
seed = 12345)
##                          stage 1 stage 2 stage 3
## cumulativeRejection        0.000   0.013   0.031
## cumulativeFutility         0.619   0.619   0.969
## numberOfEvents            16.000  24.000  32.000
## numberOfSubjects          55.453  75.562  95.329
## analysisTime              11.012  14.938  18.919
## overallReject              0.031
## expectedNumberOfEvents    21.992
## expectedNumberOfSubjects  70.392
## expectedStudyDuration     14.015