Performs simulation for two-arm group sequential trials based on weighted log-rank test for a biomarker enrichment design. The looks are either driven by the total number of events in the ITT population or the biomarker positive sub population. Alternatively, the analyses can be planned to occur at specified calendar times.
lrsimsub(
kMax = 1L,
kMaxitt = 1L,
hazardRatioH0itt = 1,
hazardRatioH0pos = 1,
hazardRatioH0neg = 1,
allocation1 = 1L,
allocation2 = 1L,
accrualTime = 0L,
accrualIntensity = NA_real_,
piecewiseSurvivalTime = 0L,
stratumFraction = 1L,
p_pos = NA_real_,
lambda1itt = NA_real_,
lambda2itt = NA_real_,
lambda1pos = NA_real_,
lambda2pos = NA_real_,
gamma1itt = 0L,
gamma2itt = 0L,
gamma1pos = 0L,
gamma2pos = 0L,
accrualDuration = NA_real_,
followupTime = NA_real_,
fixedFollowup = 0L,
rho1 = 0,
rho2 = 0,
plannedEvents = NA_integer_,
plannedTime = NA_real_,
maxNumberOfIterations = 1000L,
maxNumberOfRawDatasetsPerStage = 0L,
seed = NA_integer_
)
A list with 2 components:
sumdata
: A data frame of summary data by iteration and stage:
iterationNumber
: The iteration number.
eventsNotAchieved
: Whether the target number of events
is not achieved for the iteration.
stageNumber
: The stage number, covering all stages even if
the trial stops at an interim look.
analysisTime
: The time for the stage since trial start.
population
: The population ("ITT", "Biomarker Positive",
"Biomarker Negative") under consideration.
accruals1
: The number of subjects enrolled at the stage for
the treatment group.
accruals2
: The number of subjects enrolled at the stage for
the control group.
totalAccruals
: The total number of subjects enrolled at
the stage.
events1
: The number of events at the stage for
the treatment group.
events2
: The number of events at the stage for
the control group.
totalEvents
: The total number of events at the stage.
dropouts1
: The number of dropouts at the stage for
the treatment group.
dropouts2
: The number of dropouts at the stage for
the control group.
totalDropouts
: The total number of dropouts at the stage.
logRankStatistic
: The log-rank test Z-statistic for
the population.
rawdata
(exists if maxNumberOfRawDatasetsPerStage
is a
positive integer): A data frame for subject-level data for selected
replications, containing the following variables:
iterationNumber
: The iteration number.
stageNumber
: The stage under consideration.
analysisTime
: The time for the stage since trial start.
subjectId
: The subject ID.
arrivalTime
: The enrollment time for the subject.
stratum
: The stratum for the subject.
biomarker
: The biomarker status for the subject (1 for
positive, 0 for negative).
treatmentGroup
: The treatment group (1 or 2) for the
subject.
survivalTime
: The underlying survival time for the subject.
dropoutTime
: The underlying dropout time for the subject.
timeUnderObservation
: The time under observation
since randomization for the subject.
event
: Whether the subject experienced an event.
dropoutEvent
: Whether the subject dropped out.
The maximum number of stages.
Number of stages with timing determined by events
in the ITT population. Ranges from 0 (none) to kMax
.
Hazard ratio under the null hypothesis for the ITT population. Defaults to 1 for superiority test.
Hazard ratio under the null hypothesis for the biomarker positive sub population. Defaults to 1 for superiority test.
Hazard ratio under the null hypothesis for the biomarker negative sub population. Defaults to 1 for superiority test.
Number of subjects in the treatment group in a randomization block. Defaults to 1 for equal randomization.
Number of subjects in the control group in a randomization block. Defaults to 1 for equal randomization.
A vector that specifies the starting time of
piecewise Poisson enrollment time intervals. Must start with 0, e.g.,
c(0, 3)
breaks the time axis into 2 accrual intervals:
[0, 3) and [3, Inf).
A vector of accrual intensities. One for each accrual time interval.
A vector that specifies the starting time of
piecewise exponential survival time intervals. Must start with 0, e.g.,
c(0, 6)
breaks the time axis into 2 event intervals:
[0, 6) and [6, Inf).
Defaults to 0 for exponential distribution.
A vector of stratum fractions that sum to 1. Defaults to 1 for no stratification.
The prevalence of the biomarker positive sub population in each stratum.
A vector of hazard rates for the event in each analysis time interval by stratum for the treatment group in the ITT population.
A vector of hazard rates for the event in each analysis time interval by stratum for the control group in the ITT population.
A vector of hazard rates for the event in each analysis time interval by stratum for the treatment group in the biomarker positive sub population.
A vector of hazard rates for the event in each analysis time interval by stratum for the control group in the biomarker positive sub population.
The hazard rate for exponential dropout, a vector of hazard rates for piecewise exponential dropout applicable for all strata, or a vector of hazard rates for dropout in each analysis time interval by stratum for the treatment group in the ITT population.
The hazard rate for exponential dropout, a vector of hazard rates for piecewise exponential dropout applicable for all strata, or a vector of hazard rates for dropout in each analysis time interval by stratum for the control group in the ITT population.
The hazard rate for exponential dropout, a vector of hazard rates for piecewise exponential dropout applicable for all strata, or a vector of hazard rates for dropout in each analysis time interval by stratum for the treatment group in the biomarker positive sub population.
The hazard rate for exponential dropout, a vector of hazard rates for piecewise exponential dropout applicable for all strata, or a vector of hazard rates for dropout in each analysis time interval by stratum for the control group in the biomarker positive sub population.
Duration of the enrollment period.
Follow-up time for the last enrolled subject.
Whether a fixed follow-up design is used. Defaults to 0 for variable follow-up.
The first parameter of the Fleming-Harrington family of weighted log-rank test. Defaults to 0 for conventional log-rank test.
The second parameter of the Fleming-Harrington family of weighted log-rank test. Defaults to 0 for conventional log-rank test.
The planned cumulative total number events in the
ITT population at Look 1 to Look kMaxitt
and the planned
cumulative total number of events at Look kMaxitt+1
to
Look kMax
in the biomarker positive sub population.
The calendar times for the analyses. To use calendar
time to plan the analyses, plannedEvents
should be missing.
The number of simulation iterations. Defaults to 1000.
The number of raw datasets per stage to extract.
The seed to reproduce the simulation results. The seed from the environment will be used if left unspecified.
Kaifeng Lu, kaifenglu@gmail.com
sim1 = lrsimsub(
kMax = 2,
kMaxitt = 2,
allocation1 = 1,
allocation2 = 1,
accrualTime = seq(0,9),
accrualIntensity = c(seq(10,70,10),rep(70,3)),
piecewiseSurvivalTime = c(0,12,24),
p_pos = 0.6,
lambda1itt = c(0.00256, 0.00383, 0.00700),
lambda2itt = c(0.00427, 0.00638, 0.01167),
lambda1pos = c(0.00299, 0.00430, 0.01064),
lambda2pos = c(0.00516, 0.00741, 0.01835),
gamma1itt = -log(1-0.04)/12,
gamma2itt = -log(1-0.04)/12,
gamma1pos = -log(1-0.04)/12,
gamma2pos = -log(1-0.04)/12,
accrualDuration = 10.14,
plannedEvents = c(108,144),
maxNumberOfIterations = 1000,
maxNumberOfRawDatasetsPerStage = 1,
seed = 314159)
head(sim1$sumdata)
head(sim1$rawdata)
Run the code above in your browser using DataLab