lrsim3a {lrstat}R Documentation

Log-rank test simulation for three arms

Description

Performs simulation for three-arm group sequential trials based on weighted log-rank test. The looks are driven by the total number of events in Arm A and Arm C combined. Alternatively, the analyses can be planned to occur at specified calendar times.

Usage

lrsim3a(
  kMax = NA_integer_,
  hazardRatioH013 = 1,
  hazardRatioH023 = 1,
  hazardRatioH012 = 1,
  allocation1 = 1L,
  allocation2 = 1L,
  allocation3 = 1L,
  accrualTime = 0L,
  accrualIntensity = NA_real_,
  piecewiseSurvivalTime = 0L,
  stratumFraction = 1L,
  lambda1 = NA_real_,
  lambda2 = NA_real_,
  lambda3 = NA_real_,
  gamma1 = 0L,
  gamma2 = 0L,
  gamma3 = 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_
)

Arguments

kMax

The maximum number of stages.

hazardRatioH013

Hazard ratio under the null hypothesis for arm 1 versus arm 3. Defaults to 1 for superiority test.

hazardRatioH023

Hazard ratio under the null hypothesis for arm 2 versus arm 3. Defaults to 1 for superiority test.

hazardRatioH012

Hazard ratio under the null hypothesis for arm 1 versus arm 2. Defaults to 1 for superiority test.

allocation1

Number of subjects in Arm A in a randomization block. Defaults to 1 for equal randomization.

allocation2

Number of subjects in Arm B in a randomization block. Defaults to 1 for equal randomization.

allocation3

Number of subjects in Arm C in a randomization block. Defaults to 1 for equal randomization.

accrualTime

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

accrualIntensity

A vector of accrual intensities. One for each accrual time interval.

piecewiseSurvivalTime

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.

stratumFraction

A vector of stratum fractions that sum to 1. Defaults to 1 for no stratification.

lambda1

A vector of hazard rates for the event in each analysis time interval by stratum for arm 1.

lambda2

A vector of hazard rates for the event in each analysis time interval by stratum for arm 2.

lambda3

A vector of hazard rates for the event in each analysis time interval by stratum for arm 3.

gamma1

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 arm 1.

gamma2

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 arm 2.

gamma3

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 arm 3.

accrualDuration

Duration of the enrollment period.

followupTime

Follow-up time for the last enrolled subject.

fixedFollowup

Whether a fixed follow-up design is used. Defaults to 0 for variable follow-up.

rho1

The first parameter of the Fleming-Harrington family of weighted log-rank test. Defaults to 0 for conventional log-rank test.

rho2

The second parameter of the Fleming-Harrington family of weighted log-rank test. Defaults to 0 for conventional log-rank test.

plannedEvents

The planned cumulative total number of events at Look 1 to Look kMax for Arms A and C combined.

plannedTime

The calendar times for the analyses. To use calendar time to plan the analyses, plannedEvents should be missing.

maxNumberOfIterations

The number of simulation iterations. Defaults to 1000.

maxNumberOfRawDatasetsPerStage

The number of raw datasets per stage to extract. Defaults to 1.

seed

The seed to reproduce the simulation results. The seed from the environment will be used if left unspecified,

Value

A list with 2 components:

Author(s)

Kaifeng Lu, kaifenglu@gmail.com

Examples


sim1 = lrsim3a(
  kMax = 3,
  allocation1 = 2,
  allocation2 = 2,
  allocation3 = 1,
  accrualTime = c(0, 8),
  accrualIntensity = c(10, 28),
  piecewiseSurvivalTime = 0,
  lambda1 = log(2)/12*0.60,
  lambda2 = log(2)/12*0.70,
  lambda3 = log(2)/12,
  accrualDuration = 30.143,
  plannedEvents = c(186, 259, 295),
  maxNumberOfIterations = 1000,
  maxNumberOfRawDatasetsPerStage = 1,
  seed = 314159)

head(sim1$sumdata)
head(sim1$rawdata)


[Package lrstat version 0.2.6 Index]