Patientwise Simulation of Multi-Arm and Enrichment Survival Designs

Gernot Wassmer

November 25, 2026

Multi-Arm Changes and Enhancements

Overview

  • Patientwise simulation of survival times
  • Specify piesewise survival times
  • Dropout proportions at analysis times
  • Non-inferiority designs

Adaptive Multi-Arm Multi-Stage Designs Using rpact

  • Can be applied to selection of one or more than one treatment arm. The number of selected arms and the way of how to select treatment arms needs not to be preplanned.

  • Data-driven recalculation of sample size or event number is possible.

  • Choice of intersection tests is free. You can choose between Dunnett, Bonferroni, Simes, Sidak, hierarchical testing, etc.

  • Choice of combination test is free. Choose between Fisher’s combination and inverse normal combination test.

  • For two-stage designs, the CRP principle can be applied: adaptive Dunnett test (König et al. (2008), Wassmer and Brannath (2025), chapter 11).

Adaptive Multi-Arm Multi-Stage Designs Using rpact

getSimulationMultiArmMeans(),

getSimulationMultiArmRates(), and

getSimulationMultiArmSurvival()

  • perform simulations in multi-arm designs for testing means, rates, and hazard ratios, respectively.

  • You can assess different treatment arm selection strategies, sample size reassessment methods, general stopping, and stopping for futility rules.

  • Define selection strategy and effect size pattern appropriately (e.g., linear, sigmoidEmax, user defined, etc).

  • For survival designs, independent increments of log-rank statistics are used.

Options and Parameters

getSimulationMultiArmMeans(plannedSubjects = )

  • design The trial design. If no trial design is specified, a fixed sample size design is used. In this case, Type I error rate alpha , Type II error rate beta , twoSidedPower , and sided can be directly entered as argument where necessary.

  • activeArms The number of active treatment arms to be compared with control, default is 3.

  • effectMatrix Matrix of effect sizes with activeArms columns and number of rows reflecting the different situations to consider.

  • typeOfShape The shape of the dose-response relationship over the treatment groups. This can be either "linear", "sigmoidEmax", or "userDefined", default is "linear". For "linear", muMaxVector specifies the range of effect sizes for the treatment group with highest response. If "sigmoidEmax" is selected, gED50 and slope has to be entered to specify the ED50 and the slope of the sigmoid Emax model. For "sigmoidEmax", muMaxVector specifies the range of effect sizes for the treatment group with response according to infinite dose. If "userDefined" is selected, effectMatrix has to be entered.

  • muMaxVector Range of effect sizes for the treatment group with highest response for "linear" and "sigmoidEmax" model, default is seq(0, 1, 0.2).

  • gED50 If typeOfShape = "sigmoidEmax" is selected, gED50 has to be entered to specify the ED50 of the sigmoid Emax model.

  • slope If typeOfShape = "sigmoidEmax" is selected, slope can be entered to specify the slope of the sigmoid Emax model, default is 1.

  • doseLevels The dose levels for the dose response relationship. If not specified, these dose levels are 1,...,activeArms.

  • intersectionTest Defines the multiple test for the intersection hypotheses in the closed system of hypotheses. Five options are available in enrichment designs: "Dunnett","Bonferroni", "Simes", "Sidak", and Hierarchical, default is "Dunnett".

  • stDev The standard deviation under which the data is simulated, default is 1. For two-armed trials, it is allowed to specify the standard deviations separately, i.e., as vector with two elements. If meanRatio = TRUE is specified, stDev defines the coefficient of variation sigma / mu2.

  • adaptations A vector of length kMax - 1 indicating whether or not an adaptation takes place at interim k, default is rep(TRUE, kMax - 1) .

  • typeOfSelection The way the treatment arms or populations are selected at interim. Five options are available: "best","rbest", "epsilon", "all", and "userDefined", default is "best".

    For "rbest" (select the rValue best treatment arms/populations), the parameter rValue has to be specified, for "epsilon" (select treatment arm/population not worse than epsilon compared to the best), the parameter epsilonValue has to be specified. If "userDefined" is selected, "selectArmsFunction" or "selectPopulationsFunction" has to be specified.

  • effectMeasure {Criterion for treatment arm/population selection, either based on test statistic ("testStatistic") or effect estimate (difference for means and rates or ratio for survival) ("effectEstimate"), default is "effectEstimate".

  • successCriterion Defines when the study is stopped for efficacy at interim. Two options are available: "all" stops the trial if the efficacy criterion is fulfilled for all selected treatment arms/populations,"atLeastOne"stops if at least one of the selected treatment arms/populations is shown to be superior to control at interim, default is "all".

  • epsilonValue For typeOfSelection = "epsilon" (select treatment arm / population not worse than epsilon compared to the best), the parameter epsilonValue has to be specified.

  • rValue For typeOfSelection = "rbest" (select the rValue best treatment arms / populations), the parameter rValue has to be specified.

  • threshold Selection criterion: treatment arm / population is selected only if effectMeasure exceeds threshold, default is -Inf. threshold can also be a vector of length activeArms referring to a separate threshold condition over the treatment arms.

  • plannedSubjects is a vector of length kMax (the number of stages of the design) that determines the number of cumulated (overall) subjects when the interim stages are planned. For two treatment arms, it is the number of subjects for both treatment arms. For multi-arm designs, plannedSubjects refers to the number of subjects for the selected active arms plus control.

  • allocationRatioPlanned The planned allocation ratio n1 / n2 for a two treatment groups design, default is 1. For multi-arm designs, it is the allocation ratio relating the active arm(s) to the control. For simulating means and rates for a two treatment groups design, it can be a vector of length kMax, the number of stages. It can be a vector of length kMax, too, for multi-arm and enrichment designs. In these cases, a change of allocating subjects to treatment groups over the stages can be assessed. Note that internally allocationRatioPlanned is treated as a vector of length kMax, not a scalar.

  • minNumberOfSubjectsPerStage When performing a data driven sample size recalculation, the vector minNumberOfSubjectsPerStage with length kMax determines the minimum number of subjects per stage (i.e., not cumulated), the first element is not taken into account. For two treatment arms, it is the number of subjects for both treatment arms. For multi-arm designs minNumberOfSubjectsPerStage refers to the minimum number of subjects per selected active arm.

  • maxNumberOfSubjectsPerStage When performing a data driven sample size recalculation, the vector maxNumberOfSubjectsPerStage with length kMax determines the maximum number of subjects per stage (i.e., not cumulated), the first element is not taken into account. For two treatment arms, it is the number of subjects for both treatment arms. For multi-arm designs maxNumberOfSubjectsPerStage refers to the maximum number of subjects per selected active arm.

  • conditionalPower If conditionalPower together with minNumberOfSubjectsPerStage and maxNumberOfSubjectsPerStage (or minNumberOfEventsPerStage and maxNumberOfEventsPerStage for survival designs) is specified, a sample size recalculation based on the specified conditional power is performed. It is defined as the power for the subsequent stage given the current data. By default, the conditional power will be calculated under the observed effect size. Optionally, you can also specify thetaH1 and stDevH1 (for simulating means), pi1H1 and pi2H1 (for simulating rates), or thetaH1 (for simulating hazard ratios) as parameters under which it is calculated and the sample size recalculation is performed.

  • thetaH1 If specified, the value of the alternative under which the conditional power or sample size recalculation calculation is performed.

  • stDevH1 If specified, the value of the standard deviation under which the conditional power or sample size recalculation calculation is performed, default is the value of stDev.

  • maxNumberOfIterations The number of simulation iterations, default is 1000.

  • seed The seed to reproduce the simulation, default is a random seed.

  • calcSubjectsFunction Optionally, a function can be entered that defines the way of performing the sample size recalculation. By default, sample size recalculation is performed with conditional power with specified minNumberOfSubjectsPerStage and maxNumberOfSubjectsPerStage (see details and examples).

  • selectArmsFunction Optionally, a function can be entered that defines the way of how treatment arms are selected. This function is allowed to depend on effectVector with length activeArms, stage, conditionalPower, conditionalCriticalValue, plannedSubjects/plannedEvents, allocationRatioPlanned, selectedArms, thetaH1 (for means and survival), stDevH1 (for means), overallEffects, and for rates additionally: piTreatmentsH1, piControlH1, overallRates, and overallRatesControl (see examples).

  • showStatistics If TRUE, summary statistics of the simulated data are displayed for the print command, otherwise the output is suppressed, default is FALSE.

Options and Parameters

getSimulationMultiArmRates(plannedSubjects = )

  • …

  • piMaxVector Range of assumed probabilities for the treatment group with highest response for “linear” and “sigmoidEmax” model, default is seq(0, 1, 0.2).

  • piControl If specified, the assumed probability in the control arm for simulation and under which the sample size recalculation is performed, default is 0.2.

…

  • piTreatmentsH1 If specified, the assumed probability in the active treatment arm(s) under which the sample size recalculation is performed.

  • piControlH1 If specified, the assumed probability in the reference group (if different from piControl) for which the conditional power was calculated.

…

Options and Parameters (old version)

getSimulationMultiArmSurvival(plannedEvents = )

  • …

  • omegaMaxVector Range of hazard ratios with highest response for "linear" and "sigmoidEmax" model, default is seq(1, 2.6, 0.4).

  • directionUpper Specifies the direction of the alternative, only applicable for one-sided testing; default in FALSE for survival data.

  • …

  • correlationComputation If correlationComputation = "alternative", for simulating log-rank statistics in the many-to-one design, a correlation matrix according to Deng et al. (Biometrics, 2019) accounting for the respective alternative is used; if correlationComputation = "null", a constant correlation matrix valid under the null, i.e., not accounting for the alternative is used, default is "alternative".

  • …

  • minNumberOfEventsPerStage When performing a data driven sample size recalculation, the vector minNumberOfEventsPerStage with length kMax determines the minimum number of events per stage (i.e., not cumulated), the first element is not taken into account.

  • maxNumberOfEventsPerStage When performing a data driven sample size recalculation, the vector maxNumberOfEventsPerStage with length kMax determines the maximum number of events per stage (i.e., not cumulated), the first element is not taken into account.

  • …

  • calcEventsFunction Optionally, a function can be entered that defines the way of performing the sample size recalculation. By default, event number recalculation is performed with conditional power with specified minNumberOfEventsPerStage and maxNumberOfEventsPerStage (see details and examples).

Time to Event example:

  • Time to disease progression event

  • 2 active arms, 1 control arm

  • Equal allocation between groups

  • Power 90%

  • \(\alpha\) = 0.025 one sided

  • 2 analyses (1 IA at 50% events) futility analysis at interim and select best dose based on best HR

  • Assume median TTE in control arm: 18 months

  • Median TTE in active: 25 months, so target HR 0.72

  • Accrual: Assume 10 for first 12 months, then 20 for next 12 then 40 per month thereafter for max 36 months

Sample Size Calculation

390 events are needed to achieve 90% power for a two-sample comparison with no interim:

getDesignFixed(
    alpha = 0.025, 
    beta = 0.1
) |>
getSampleSizeSurvival(
  median2 = 18,
  hazardRatio = 0.72,
  accrualTime = c(0, 12, 24, 36),
  accrualIntensity = c(10, 20, 40)
) |> summary()

Sample Size Calculation

Sample size calculation for a survival endpoint

Fixed sample analysis, one-sided significance level 2.5%, power 90%. The results were calculated for a two-sample logrank test, H0: hazard ratio = 1, H1: hazard ratio = 0.72, control median(2) = 18, accrual time = c(12, 24, 36), accrual intensity = c(10, 20, 40).

Stage Fixed
Stage level (one-sided) 0.0250
Efficacy boundary (z-value scale) 1.960
Efficacy boundary (t) 0.820
Number of subjects 840.0
Number of events 389.5
Analysis time 43.48
Expected study duration 43.48

Legend:

  • (t): treatment effect scale

Design with Interim Stage and Bonferroni

Adjusted significance level \(\alpha / 2\) and introduce futility stopping bound

getDesignInverseNormal(
  kMax = 2,
  typeOfDesign = "noEarlyEfficacy",
  alpha = 0.0125,
  beta = 0.1,
  futilityBounds = 0
) |> 
getSampleSizeSurvival(
  median2 = 18,
  hazardRatio = c(0.72, 0.75),
  accrualTime = c(0, 12, 24, 36),
  accrualIntensity = c(10, 20, 40)
) |> summary()

Design with Interim Stage and Bonferroni

Sample size calculation for a survival endpoint

Sequential analysis with a maximum of two looks (inverse normal combination test design), one-sided overall significance level 1.25%. The results were calculated for a two-sample logrank test, H0: hazard ratio = 1, H1: hazard ratio as specified, control median(2) = 18, accrual time = c(12, 24, 36), accrual intensity = c(10, 20, 40).

Stage 1 2
Fixed weight 0.707 0.707
Cumulative alpha spent 0 0.0125
Stage levels (one-sided) 0 0.0125
Efficacy boundary (z-value scale) Inf 2.241
Futility boundary (z-value scale) 0
Efficacy boundary (t), HR = 0.72 0 0.812
Efficacy boundary (t), HR = 0.75 0 0.833
Futility boundary (t), HR = 0.72 1.000
Futility boundary (t), HR = 0.75 1.000
Cumulative power 0 0.9000
Number of subjects, HR = 0.72 765.8 840.0
Number of subjects, HR = 0.75 840.0 840.0
Expected number of subjects, HR = 0.72 839.5
Expected number of subjects, HR = 0.75 840.0
Cumulative number of events, HR = 0.72 230.8 461.6
Cumulative number of events, HR = 0.75 301.0 601.9
Expected number of events, HR = 0.72 460.2
Expected number of events, HR = 0.75 600.0
Analysis time, HR = 0.72 34.15 48.84
Analysis time, HR = 0.75 37.76 62.42
Expected study duration, HR = 0.72 48.75
Expected study duration, HR = 0.75 62.27
Stopping probability 0.0063
Stopping probability by stage (under H0) 0.5000
Stopping probability by stage 0.0063
Efficacy stopping probability by stage (under H0) 0
Efficacy stopping probability by stage 0
Futility stopping probability by stage (under H0) 0.5000
Futility stopping probability by stage 0.0063

Legend:

  • (t): treatment effect scale
  • HR: hazard ratio

A Multi-Arm Approach

  • Based on this result, we plan a multi-arm design with a maximum of 460 events in order to achieve power 90%

  • The procedure is designed in such a way that in case of selecting a treatment arm after 230 events the specified remaining 230 events need to be observed for the remaining arms (i.e., no event number recalculation)

  • Note, for multi-armed designs, simulating TTE on a patient level was not available up to rpact version 4.4. The approach of Deng et al. (2019) for simulating normally distributed log-rank statistics was implemented

  • The number of events for pairwise comparisons are estimated from the assumption about the hazard ratios

  • This provides a (good?) approximation for the assessment of test characteristics, i.e., for the estimation of power and selection probabilities

  • New in rpact 5.0: Simulation of patientwise survival times.

Example Select All with v4.4

design <- getDesignInverseNormal(
  kMax = 2,
  typeOfDesign = "noEarlyEfficacy",
  alpha = 0.025,
  futilityBounds = 0
)
effectMatrix <- matrix(c(0.72, 0.72,
                        0.72, 0.86,
                        1, 1), 
                       ncol = 2, byrow = TRUE)

maxNumberOfIterations <- 1000

getSimulationMultiArmSurvival(
  design = design,
  typeOfShape = "userDefined",
  effectMatrix = effectMatrix,
  # activeArms = 2,         #  is calculated   
  directionUpper = FALSE,   #  new as default  
  typeOfSelection = "all",
  plannedEvents = c(230, 460),
  #simulationType = "testStatisticBased",   #  is derived
  correlationComputation = "alternative",   #   default
  maxNumberOfIterations = maxNumberOfIterations,
  seed = 1234
) |> summary()

Example Select All with v4.4

Simulation of a survival endpoint (multi-arm design)

Sequential analysis with a maximum of two looks (inverse normal combination test design), one-sided overall significance level 2.5%. The results were obtained using test-statistic-based simulation for a multi-arm logrank test (2 treatments vs. control), H0: hazard ratio(i) = 1, power directed towards smaller values, H1: omega_max = c(0.72, 0.86, 1), control rate pi(control) = 0.5, planned cumulative events = c(230, 460), effect shape = user defined, intersection test = Dunnett, selection = all, effect measure based on effect estimate, success criterion: all, simulation runs = 1000, seed = 1234.

User defined effect shape:

Situation 1 Situation 2 Situation 3
Arm 1 0.72 0.72 1.00
Arm 2 0.72 0.86 1.00
Stage 1 2
Fixed weight 0.707 0.707
Cumulative alpha spent 0 0.0250
Stage levels (one-sided) 0 0.0250
Efficacy boundary (z-value scale) Inf 1.960
Futility boundary (z-value scale) 0
Reject at least one [1] 0.8820
Reject at least one [2] 0.7360
Reject at least one [3] 0.0180
Rejected arms per stage [1]
Treatment arm 1 vs. control 0 0.8000
Treatment arm 2 vs. control 0 0.8070
Rejected arms per stage [2]
Treatment arm 1 vs. control 0 0.7290
Treatment arm 2 vs. control 0 0.2790
Rejected arms per stage [3]
Treatment arm 1 vs. control 0 0.0100
Treatment arm 2 vs. control 0 0.0100
Cumulative number of events [1]
Treatment arm 1 vs. control 162.1 324.3
Treatment arm 2 vs. control 162.1 324.3
Cumulative number of events [2]
Treatment arm 1 vs. control 153.3 306.7
Treatment arm 2 vs. control 165.8 331.6
Cumulative number of events [3]
Treatment arm 1 vs. control 153.3 306.7
Treatment arm 2 vs. control 153.3 306.7
Expected number of events [1] 457.9
Expected number of events [2] 456.3
Expected number of events [3] 348.9
Selected arms [1]
Treatment arm 1 vs. control 1.0000 0.9910
Treatment arm 2 vs. control 1.0000 0.9910
Selected arms [2]
Treatment arm 1 vs. control 1.0000 0.9840
Treatment arm 2 vs. control 1.0000 0.9840
Selected arms [3]
Treatment arm 1 vs. control 1.0000 0.5170
Treatment arm 2 vs. control 1.0000 0.5170
Number of selected active arms [1] 2.000 2.000
Number of selected active arms [2] 2.000 2.000
Number of selected active arms [3] 2.000 2.000
Conditional power (achieved) [1] 0.8604
Conditional power (achieved) [2] 0.7576
Conditional power (achieved) [3] 0.2787
Stopping probability [1] 0.0090
Stopping probability [2] 0.0160
Stopping probability [3] 0.4830
Efficacy stopping probability by stage [1] 0
Efficacy stopping probability by stage [2] 0
Efficacy stopping probability by stage [3] 0
Futility stopping probability by stage [1] 0.0090
Futility stopping probability by stage [2] 0.0160
Futility stopping probability by stage [3] 0.4830

Legend:

  • (i): results of treatment arm i vs. control arm
  • [j]: effect shape situation j

Example Select the Best with v4.4

getSimulationMultiArmSurvival(
  design = design,
  typeOfShape = "userDefined",
  effectMatrix = effectMatrix,
  directionUpper = FALSE, 
  typeOfSelection = "all",
  plannedEvents = c(230, 460),
  maxNumberOfIterations = maxNumberOfIterations,
  seed = 1234
) |> summary()

Example Select the Best with v4.4

Simulation of a survival endpoint (multi-arm design)

Sequential analysis with a maximum of two looks (inverse normal combination test design), one-sided overall significance level 2.5%. The results were obtained using test-statistic-based simulation for a multi-arm logrank test (2 treatments vs. control), H0: hazard ratio(i) = 1, power directed towards smaller values, H1: omega_max = c(0.72, 0.86, 1), control rate pi(control) = 0.5, planned cumulative events = c(230, 460), effect shape = user defined, intersection test = Dunnett, selection = all, effect measure based on effect estimate, success criterion: all, simulation runs = 1000, seed = 1234.

User defined effect shape:

Situation 1 Situation 2 Situation 3
Arm 1 0.72 0.72 1.00
Arm 2 0.72 0.86 1.00
Stage 1 2
Fixed weight 0.707 0.707
Cumulative alpha spent 0 0.0250
Stage levels (one-sided) 0 0.0250
Efficacy boundary (z-value scale) Inf 1.960
Futility boundary (z-value scale) 0
Reject at least one [1] 0.8820
Reject at least one [2] 0.7360
Reject at least one [3] 0.0180
Rejected arms per stage [1]
Treatment arm 1 vs. control 0 0.8000
Treatment arm 2 vs. control 0 0.8070
Rejected arms per stage [2]
Treatment arm 1 vs. control 0 0.7290
Treatment arm 2 vs. control 0 0.2790
Rejected arms per stage [3]
Treatment arm 1 vs. control 0 0.0100
Treatment arm 2 vs. control 0 0.0100
Cumulative number of events [1]
Treatment arm 1 vs. control 162.1 324.3
Treatment arm 2 vs. control 162.1 324.3
Cumulative number of events [2]
Treatment arm 1 vs. control 153.3 306.7
Treatment arm 2 vs. control 165.8 331.6
Cumulative number of events [3]
Treatment arm 1 vs. control 153.3 306.7
Treatment arm 2 vs. control 153.3 306.7
Expected number of events [1] 457.9
Expected number of events [2] 456.3
Expected number of events [3] 348.9
Selected arms [1]
Treatment arm 1 vs. control 1.0000 0.9910
Treatment arm 2 vs. control 1.0000 0.9910
Selected arms [2]
Treatment arm 1 vs. control 1.0000 0.9840
Treatment arm 2 vs. control 1.0000 0.9840
Selected arms [3]
Treatment arm 1 vs. control 1.0000 0.5170
Treatment arm 2 vs. control 1.0000 0.5170
Number of selected active arms [1] 2.000 2.000
Number of selected active arms [2] 2.000 2.000
Number of selected active arms [3] 2.000 2.000
Conditional power (achieved) [1] 0.8604
Conditional power (achieved) [2] 0.7576
Conditional power (achieved) [3] 0.2787
Stopping probability [1] 0.0090
Stopping probability [2] 0.0160
Stopping probability [3] 0.4830
Efficacy stopping probability by stage [1] 0
Efficacy stopping probability by stage [2] 0
Efficacy stopping probability by stage [3] 0
Futility stopping probability by stage [1] 0.0090
Futility stopping probability by stage [2] 0.0160
Futility stopping probability by stage [3] 0.4830

Legend:

  • (i): results of treatment arm i vs. control arm
  • [j]: effect shape situation j

  • Fast simulation for reasonable maxNumberOfIterations
  • Type of simulation (patientwise or not) is derived automatically
  • Through selection procedure there might be a gain in power
  • Consider different situations through specification of effectMatrix
  • Type I error rate controlled
  • Assessment of futility stops possible through simulation
  • No assessment of study duration, expected number of subjects, etc.
  • Simulation on the patient level possible with v5.0

New Options and Parameters in v5.0

getSimulationMultiArmSurvival(plannedEvents = )

  • …

  • omegaMaxVector Range of hazard ratios with highest response for "linear" and "sigmoidEmax" model, default is seq(1, 0.4, -0.2).

  • …

  • simulationType Character value specifying the simulation approach: "auto", "patientWise", "testStatisticBased", or "patientWiseBasic". If "auto" is specified, the simulation type is selected automatically based on the explicitly specified arguments. If patient-wise-specific arguments such as piControl, eventTime, accrualTime, accrualIntensity, accrualIntensityType, dropoutRate1, dropoutRate2, dropoutTime, maxNumberOfSubjects, or kappa are provided, a patient-wise simulation approach is used; otherwise the test-statistic-based simulation is used for backward compatibility.

  • thetaH0 The null hypothesis value as compared to the control, default is 0 for general estimates, the normal case, and the binary case, it is 1 for the survival case (testing the hazard ratio).

    For non-inferiority designs, thetaH0 is the non-inferiority bound. That is, in case of (one-sided) testing of

    • general estimates: a value on the scale of the supplied estimates can be specified.

    • means: a value != 0 (or a value != 1 for testing the mean ratio) can be specified.

    • rates: a value != 0 (or a value != 1 for testing the risk ratio pi1 / pi2) can be specified.

    • survival data: a bound for testing H0: hazard ratio = thetaH0 != 1 can be specified.

    • count data: a bound for testing H0: lambda1 / lambda2 = thetaH0 != 1 can be specified.

  • maxNumberOfSubjects needs to be specified for simulationType not equal "testStatisticBased". If accrual time and accrual intensity are specified, this will be calculated. Must be a positive integer of length 1.

  • piControl If specified, the assumed probability in the control arm for simulation, default is 0.20.

  • eventTime The assumed time under which the event rates are calculated, default is 12.

  • piecewiseSurvivalTime A PiecewiseSurvivalTimeMultiArm object created by getPiecewiseSurvivalTimeMultiArm(). It specifies common interval start times, the control hazard in every interval, and an active-arm-by-interval hazard-ratio matrix for every situation. It can only be used for patient-wise simulation with kappa = 1, and cannot be combined with piControl or effectMatrix.

  • accrualTime The assumed accrual time intervals for the study, default is c(0, 12) (for details see getAccrualTime()).

  • accrualIntensity A numeric vector of accrual intensities, default is the relative intensity 0.1 (for details see getAccrualTime()).

  • accrualIntensityType A character value specifying the accrual intensity input type. Must be one of "auto", "absolute", or "relative"; default is "auto", i.e., if all values are < 1 the type is "relative", otherwise it is "absolute".

  • dropoutRate1 The assumed drop-out rate in the treatment group, default is 0. For multi-arm simulations, this can be a vector of length equal to the number of active arms, specifying different drop-out rates for each active arm.

  • dropoutRate2 The assumed drop-out rate in the control group, default is 0.

  • dropoutTime The assumed time for drop-out rates in the control and the treatment group, default is 12.

  • maxNumberOfRawDatasetsPerStage The maximum number of patient-level datasets to retain for each scenario and stopping stage. The default is 0, which retains no patient-level data. Use getRawData() to retrieve retained datasets.

  • kappa A numeric value > 0. A kappa != 1 will be used for the specification of the shape of the Weibull distribution. Default is 1, i.e., the exponential survival distribution is used instead of the Weibull distribution. Note that the Weibull distribution cannot be used for the piecewise definition of the survival time distribution, i.e., only piecewiselambda (as a single value) and kappa can be specified. This function is equivalent to pweibull(q = time, shape = kappa, scale = 1 / lambda) of the stats package. For example, getPiecewiseExponentialDistribution(time = 130, piecewiseLambda = 0.01, kappa = 4.2) and pweibull(q = 130, shape = 4.2, scale = 1 / 0.01) provide the same result.

Example Select All, Patientwise Simulation

design <- getDesignInverseNormal(
  kMax = 2,
  typeOfDesign = "noEarlyEfficacy",
  futilityBounds = 0,
  alpha = 0.025
)
effectMatrix <- matrix(c(0.72, 0.72,
                        0.72, 0.86,
                        1, 1), 
                       ncol = 2, byrow = TRUE)

x <- getSimulationMultiArmSurvival(
  design = design,
  typeOfShape = "userDefined",
  effectMatrix = effectMatrix,
  directionUpper = FALSE,
  piControl = getPiByMedian(18, eventTime = 12),# to specify, otherwise default (0.2)!
  eventTime = 12,                   #   to specify, otherwise default (12)!
  typeOfSelection = "all",
  plannedEvents = c(230, 460),
  simulationType = "patientWise",    #   new, but derived!
  accrualTime = c(0, 12, 24, 36),    #   to specify!
  accrualIntensity = c(10, 20, 40),  #   to specify!
  maxNumberOfIterations = maxNumberOfIterations,
  seed = 123
) 

Example Select All, Patientwise Simulation

print(x)

Simulation of multi-arm survival data (inverse normal combination test design)

Design parameters

  • Information rates: 0.500, 1.000
  • Critical values: Inf, 1.960
  • Futility bounds (non-binding): 0.000
  • Cumulative alpha spending: 0.0000, 0.0250
  • Local one-sided significance levels: 0.0000, 0.0250
  • Significance level: 0.0250
  • Test: one-sided

User defined parameters

  • Assumed control rate: 0.370
  • Effect matrix (1): 0.72, 0.72, 1.00
  • Effect matrix (2): 0.72, 0.86, 1.00
  • Type of shape: userDefined
  • Simulation type: patientWise
  • Direction upper: FALSE
  • Accrual time: 12.00, 24.00, 36.00
  • Accrual intensity: 10.0, 20.0, 40.0
  • Seed: 123
  • Maximum number of iterations: 1000
  • Planned cumulative events: 230, 460
  • Type of selection: all

Default parameters

  • Theta H0: 1
  • Slope: 1
  • Planned allocation ratio: 1
  • Event time: 12
  • kappa: 1
  • Drop-out rate (per arm): 0.000
  • Drop-out rate (control): 0.000
  • Drop-out time: 12.00
  • Calculate events function: Conditional power based
  • Adaptations: TRUE
  • Threshold: -Inf
  • Intersection test: Dunnett
  • Success criterion: all
  • Effect measure: effectEstimate

Derived parameters

  • Active arms: 2
  • Lambda (1): 0.0277, 0.0277, 0.0385
  • Lambda (2): 0.0277, 0.0331, 0.0385
  • Lambda (control): 0.0385
  • Median (1): 25.000, 25.000, 18.000
  • Median (2): 25.000, 20.930, 18.000
  • Median (control): 18.000
  • Maximum number of subjects: 840
  • Effect size in highest dose arm: 0.720, 0.860, 1.000

Results

  • Single number of events (1) [1]: 70.5, 67.7, 76.9
  • Single number of events (1) [2]: 72.6, 69.9, 77.6
  • Single number of events (2) [1]: 70.3, 76.7, 76.8
  • Single number of events (2) [2]: 72.6, 77, 77.1
  • Single number of events (control) [1]: 89.2, 85.6, 76.3
  • Single number of events (control) [2]: 84.9, 83, 75.3
  • Cumulative number of events (1) [1]: 159.7, 153.3, 153.2
  • Cumulative number of events (1) [2]: 317.1, 306.3, 306.1
  • Cumulative number of events (2) [1]: 159.5, 162.3, 153.1
  • Cumulative number of events (2) [2]: 317, 322.4, 305.5
  • Expected number of events: 457, 452.2, 343.2
  • Number of subjects [1]: 785, 761.9, 704.2
  • Number of subjects [2]: 840, 840, 840
  • Expected number of subjects: 839.3, 837.3, 771
  • Rejected arms per stage {1} [1]: 0.0000, 0.0000, 0.0000
  • Rejected arms per stage {1} [2]: 0.8010, 0.7340, 0.0100
  • Rejected arms per stage {2} [1]: 0.0000, 0.0000, 0.0000
  • Rejected arms per stage {2} [2]: 0.8080, 0.2920, 0.0110
  • Overall reject at least one: 0.8730, 0.7400, 0.0200
  • Futility stop: 0.0130, 0.0340, 0.5080
  • Early stop: 0.0130, 0.0340, 0.5080
  • Analysis time [1]: 34.64, 34.06, 32.62
  • Analysis time [2]: 49.99, 48.59, 45.26
  • Expected study duration: 49.79, 48.09, 38.84
  • Maximum study duration: 49.99, 48.59, 45.26
  • Success per stage [1]: 0.0000, 0.0000, 0.0000
  • Success per stage [2]: 0.7360, 0.2860, 0.0010
  • Selected arms {1} [1]: 1.0000, 1.0000, 1.0000
  • Selected arms {1} [2]: 0.9870, 0.9660, 0.4920
  • Selected arms {2} [1]: 1.0000, 1.0000, 1.0000
  • Selected arms {2} [2]: 0.9870, 0.9660, 0.4920
  • Number of selected active arms [1]: 2.000, 2.000, 2.000
  • Number of selected active arms [2]: 2.000, 2.000, 2.000
  • Conditional power (achieved) [1]: NA, NA, NA
  • Conditional power (achieved) [2]: 0.7463, 0.5398, 0.1288
  • Iterations [1]: 1000, 1000, 1000
  • Iterations [2]: 987, 966, 492

Legend

  • (i): values of treatment arm i
  • {j}: values of treatment arm j compared to control
  • [k]: values at stage k

Example Select All, Patientwise Simulation

summary(x)

Simulation of a survival endpoint (multi-arm design)

Sequential analysis with a maximum of two looks (inverse normal combination test design), one-sided overall significance level 2.5%. The results were obtained using patient-level simulation for a multi-arm logrank test (2 treatments vs. control), H0: hazard ratio(i) = 1, power directed towards smaller values, H1: omega_max = c(0.72, 0.86, 1), control rate pi(control) = 0.37, planned cumulative events = c(230, 460), event time = 12, accrual time = c(12, 24, 36), accrual intensity = c(10, 20, 40), effect shape = user defined, intersection test = Dunnett, selection = all, effect measure based on effect estimate, success criterion: all, simulation runs = 1000, seed = 123.

User defined effect shape:

Situation 1 Situation 2 Situation 3
Arm 1 0.72 0.72 1.00
Arm 2 0.72 0.86 1.00
Stage 1 2
Fixed weight 0.707 0.707
Cumulative alpha spent 0 0.0250
Stage levels (one-sided) 0 0.0250
Efficacy boundary (z-value scale) Inf 1.960
Futility boundary (z-value scale) 0
Reject at least one [1] 0.8730
Reject at least one [2] 0.7400
Reject at least one [3] 0.0200
Rejected arms per stage [1]
Treatment arm 1 vs. control 0 0.8010
Treatment arm 2 vs. control 0 0.8080
Rejected arms per stage [2]
Treatment arm 1 vs. control 0 0.7340
Treatment arm 2 vs. control 0 0.2920
Rejected arms per stage [3]
Treatment arm 1 vs. control 0 0.0100
Treatment arm 2 vs. control 0 0.0110
Number of subjects [1] 785.0 840.0
Number of subjects [2] 761.9 840.0
Number of subjects [3] 704.2 840.0
Expected number of subjects [1] 839.3
Expected number of subjects [2] 837.3
Expected number of subjects [3] 771.0
Cumulative number of events [1]
Treatment arm 1 vs. control 159.7 317.1
Treatment arm 2 vs. control 159.5 317.0
Cumulative number of events [2]
Treatment arm 1 vs. control 153.3 306.3
Treatment arm 2 vs. control 162.3 322.4
Cumulative number of events [3]
Treatment arm 1 vs. control 153.2 306.1
Treatment arm 2 vs. control 153.1 305.5
Expected number of events [1] 457.0
Expected number of events [2] 452.2
Expected number of events [3] 343.2
Selected arms [1]
Treatment arm 1 vs. control 1.0000 0.9870
Treatment arm 2 vs. control 1.0000 0.9870
Selected arms [2]
Treatment arm 1 vs. control 1.0000 0.9660
Treatment arm 2 vs. control 1.0000 0.9660
Selected arms [3]
Treatment arm 1 vs. control 1.0000 0.4920
Treatment arm 2 vs. control 1.0000 0.4920
Number of selected active arms [1] 2.000 2.000
Number of selected active arms [2] 2.000 2.000
Number of selected active arms [3] 2.000 2.000
Analysis time [1] 34.64 49.99
Analysis time [2] 34.06 48.59
Analysis time [3] 32.62 45.26
Expected study duration [1] 49.79
Expected study duration [2] 48.09
Expected study duration [3] 38.84
Conditional power (achieved) [1] 0.7463
Conditional power (achieved) [2] 0.5398
Conditional power (achieved) [3] 0.1288
Stopping probability by stage [1] 0.0130
Stopping probability by stage [2] 0.0340
Stopping probability by stage [3] 0.5080
Efficacy stopping probability by stage [1] 0
Efficacy stopping probability by stage [2] 0
Efficacy stopping probability by stage [3] 0
Futility stopping probability by stage [1] 0.0130
Futility stopping probability by stage [2] 0.0340
Futility stopping probability by stage [3] 0.5080

Legend:

  • (i): results of treatment arm i vs. control arm
  • [j]: effect shape situation j

Example Select the Best, Patientwise Simulation

y <- getSimulationMultiArmSurvival(
  design = design,
  typeOfShape = "userDefined",
  effectMatrix = effectMatrix,
  directionUpper = FALSE,
  piControl = getPiByMedian(18, eventTime = 12),
  eventTime = 12,
  typeOfSelection = "best",
  plannedEvents = c(230, 460),
  simulationType = "patientWise",    
  accrualTime = c(0, 12, 24, 36),    
  accrualIntensity = c(10, 20, 40),  
  maxNumberOfRawDatasetsPerStage = 1,
  dropoutRate1 = c(0.01, 0.02),
  dropoutRate2 = 0.0,
  dropoutTime = 12,
  maxNumberOfIterations = maxNumberOfIterations,
  seed = 123
) 
summary(y)  

Example Select the Best, Patientwise Simulation

Simulation of a survival endpoint (multi-arm design)

Sequential analysis with a maximum of two looks (inverse normal combination test design), one-sided overall significance level 2.5%. The results were obtained using patient-level simulation for a multi-arm logrank test (2 treatments vs. control), H0: hazard ratio(i) = 1, power directed towards smaller values, H1: omega_max = c(0.72, 0.86, 1), control rate pi(control) = 0.37, planned cumulative events = c(230, 460), event time = 12, accrual time = c(12, 24, 36), accrual intensity = c(10, 20, 40), dropout rate(1) = c(0.01, 0.02), dropout rate(2) = 0, dropout time = 12, effect shape = user defined, intersection test = Dunnett, selection = best, effect measure based on effect estimate, success criterion: all, simulation runs = 1000, seed = 123.

User defined effect shape:

Situation 1 Situation 2 Situation 3
Arm 1 0.72 0.72 1.00
Arm 2 0.72 0.86 1.00
Stage 1 2
Fixed weight 0.707 0.707
Cumulative alpha spent 0 0.0250
Stage levels (one-sided) 0 0.0250
Efficacy boundary (z-value scale) Inf 1.960
Futility boundary (z-value scale) 0
Reject at least one [1] 0.9100
Reject at least one [2] 0.8100
Reject at least one [3] 0.0230
Rejected arms per stage [1]
Treatment arm 1 vs. control 0 0.4660
Treatment arm 2 vs. control 0 0.4440
Rejected arms per stage [2]
Treatment arm 1 vs. control 0 0.7420
Treatment arm 2 vs. control 0 0.0680
Rejected arms per stage [3]
Treatment arm 1 vs. control 0 0.0100
Treatment arm 2 vs. control 0 0.0130
Number of subjects [1] 789.3 840.0
Number of subjects [2] 765.7 840.0
Number of subjects [3] 706.2 840.0
Expected number of subjects [1] 839.6
Expected number of subjects [2] 837.5
Expected number of subjects [3] 777.4
Cumulative number of events [1]
Treatment arm 1 vs. control 160.3 337.2
Treatment arm 2 vs. control 159.6 334.8
Cumulative number of events [2]
Treatment arm 1 vs. control 153.4 367.1
Treatment arm 2 vs. control 162.4 300.9
Cumulative number of events [3]
Treatment arm 1 vs. control 153.8 324.8
Treatment arm 2 vs. control 153.3 325.3
Expected number of events [1] 458.2
Expected number of events [2] 452.2
Expected number of events [3] 352.4
Selected arms [1]
Treatment arm 1 vs. control 1.0000 0.5010
Treatment arm 2 vs. control 1.0000 0.4910
Selected arms [2]
Treatment arm 1 vs. control 1.0000 0.8260
Treatment arm 2 vs. control 1.0000 0.1400
Selected arms [3]
Treatment arm 1 vs. control 1.0000 0.2630
Treatment arm 2 vs. control 1.0000 0.2690
Number of selected active arms [1] 2.000 1.000
Number of selected active arms [2] 2.000 1.000
Number of selected active arms [3] 2.000 1.000
Analysis time [1] 34.76 59.59
Analysis time [2] 34.16 57.73
Analysis time [3] 32.67 51.84
Expected study duration [1] 59.39
Expected study duration [2] 56.93
Expected study duration [3] 42.87
Conditional power (achieved) [1] 0.7323
Conditional power (achieved) [2] 0.5077
Conditional power (achieved) [3] 0.1300
Stopping probability by stage [1] 0.0080
Stopping probability by stage [2] 0.0340
Stopping probability by stage [3] 0.4680
Efficacy stopping probability by stage [1] 0
Efficacy stopping probability by stage [2] 0
Efficacy stopping probability by stage [3] 0
Futility stopping probability by stage [1] 0.0080
Futility stopping probability by stage [2] 0.0340
Futility stopping probability by stage [3] 0.4680
Observed drop-out proportion [1]
Treatment arm 1 0.00834 0.01865
Treatment arm 2 0.0160 0.0376
Control 0.000 0.000
Observed drop-out proportion [2]
Treatment arm 1 0.00769 0.01757
Treatment arm 2 0.0154 0.0350
Control 0.000 0.000
Observed drop-out proportion [3]
Treatment arm 1 0.00712 0.01427
Treatment arm 2 0.0139 0.0282
Control 0.000 0.000

Legend:

  • (i): results of treatment arm i vs. control arm
  • [j]: effect shape situation j

Plots

plot(y, type = "all")

Plots

$`Overall Success`


$`Success per Stage`


$`Selected Arms per Stage`


$`Rejected Arms per Stage`


$`Overall Power and Early Stopping`


$`Expected Sample Size and Power / Early Stop`


$`Overall Power`


$`Overall Early Stopping`


$`Expected Sample Size`


$`Study Duration`


$`Expected Number of Subjects`


$`Analysis Time`

Raw data

library(dplyr)

out <- tibble(getRawData(y))
print(out, , width = 150, n = 100)

Raw data

# A tibble: 5,040 × 12
    scenario iterationNumber stopStage subjectId accrualTime treatmentGroup
       <int>           <int>     <int>     <int>       <dbl>          <int>
  1        1               1         2         1         0.1              1
  2        1               1         2         2         0.2              2
  3        1               1         2         3         0.3              3
  4        1               1         2         4         0.4              1
  5        1               1         2         5         0.5              2
  6        1               1         2         6         0.6              3
  7        1               1         2         7         0.7              1
  8        1               1         2         8         0.8              2
  9        1               1         2         9         0.9              3
 10        1               1         2        10         1                1
 11        1               1         2        11         1.1              2
 12        1               1         2        12         1.2              3
 13        1               1         2        13         1.3              1
 14        1               1         2        14         1.4              2
 15        1               1         2        15         1.5              3
 16        1               1         2        16         1.6              1
 17        1               1         2        17         1.7              2
 18        1               1         2        18         1.8              3
 19        1               1         2        19         1.9              1
 20        1               1         2        20         2                2
 21        1               1         2        21         2.1              3
 22        1               1         2        22         2.2              1
 23        1               1         2        23         2.3              2
 24        1               1         2        24         2.4              3
 25        1               1         2        25         2.5              1
 26        1               1         2        26         2.6              2
 27        1               1         2        27         2.7              3
 28        1               1         2        28         2.8              1
 29        1               1         2        29         2.9              2
 30        1               1         2        30         3                3
 31        1               1         2        31         3.1              1
 32        1               1         2        32         3.2              2
 33        1               1         2        33         3.3              3
 34        1               1         2        34         3.4              1
 35        1               1         2        35         3.5              2
 36        1               1         2        36         3.6              3
 37        1               1         2        37         3.7              1
 38        1               1         2        38         3.8              2
 39        1               1         2        39         3.9              3
 40        1               1         2        40         4                1
 41        1               1         2        41         4.1              2
 42        1               1         2        42         4.2              3
 43        1               1         2        43         4.3              1
 44        1               1         2        44         4.4              2
 45        1               1         2        45         4.5              3
 46        1               1         2        46         4.6              1
 47        1               1         2        47         4.7              2
 48        1               1         2        48         4.8              3
 49        1               1         2        49         4.9              1
 50        1               1         2        50         5                2
 51        1               1         2        51         5.1              3
 52        1               1         2        52         5.2              1
 53        1               1         2        53         5.3              2
 54        1               1         2        54         5.4              3
 55        1               1         2        55         5.5              1
 56        1               1         2        56         5.6              2
 57        1               1         2        57         5.7              3
 58        1               1         2        58         5.8              1
 59        1               1         2        59         5.9              2
 60        1               1         2        60         6                3
 61        1               1         2        61         6.1              1
 62        1               1         2        62         6.2              2
 63        1               1         2        63         6.3              3
 64        1               1         2        64         6.4              1
 65        1               1         2        65         6.5              2
 66        1               1         2        66         6.6              3
 67        1               1         2        67         6.7              1
 68        1               1         2        68         6.8              2
 69        1               1         2        69         6.9              3
 70        1               1         2        70         7                1
 71        1               1         2        71         7.1              2
 72        1               1         2        72         7.2              3
 73        1               1         2        73         7.3              1
 74        1               1         2        74         7.4              2
 75        1               1         2        75         7.5              3
 76        1               1         2        76         7.6              1
 77        1               1         2        77         7.7              2
 78        1               1         2        78         7.8              3
 79        1               1         2        79         7.9              1
 80        1               1         2        80         8                2
 81        1               1         2        81         8.1              3
 82        1               1         2        82         8.2              1
 83        1               1         2        83         8.3              2
 84        1               1         2        84         8.4              3
 85        1               1         2        85         8.5              1
 86        1               1         2        86         8.6              2
 87        1               1         2        87         8.7              3
 88        1               1         2        88         8.8              1
 89        1               1         2        89         8.9              2
 90        1               1         2        90         9                3
 91        1               1         2        91         9.1              1
 92        1               1         2        92         9.2              2
 93        1               1         2        93         9.3              3
 94        1               1         2        94         9.4              1
 95        1               1         2        95         9.5              2
 96        1               1         2        96         9.6              3
 97        1               1         2        97         9.7              1
 98        1               1         2        98         9.8              2
 99        1               1         2        99         9.9              3
100        1               1         2       100        10                1
    survivalTime dropoutTime lastObservationTime timeUnderObservation event
           <dbl>       <dbl>               <dbl>                <dbl> <lgl>
  1       12.2      1854.                   59.0               12.2   TRUE 
  2       19.0      1275.                   59.0               19.0   TRUE 
  3       73.3        NA                    59.0               58.7   FALSE
  4        1.68      897.                   59.0                1.68  TRUE 
  5       80.4       476.                   59.0               58.5   FALSE
  6       15.8        NA                    59.0               15.8   TRUE 
  7      113.        721.                   59.0               58.3   FALSE
  8       40.8       505.                   59.0               40.8   TRUE 
  9        2.82       NA                    59.0                2.82  TRUE 
 10       83.0       337.                   59.0               58.0   FALSE
 11        1.55      236.                   59.0                1.55  TRUE 
 12       80.2        NA                    59.0               57.8   FALSE
 13       79.5      1409.                   59.0               57.7   FALSE
 14       36.9      3066.                   59.0               36.9   TRUE 
 15       27.7        NA                    59.0               27.7   TRUE 
 16       44.5       938.                   59.0               44.5   TRUE 
 17       32.5       203.                   59.0               32.5   TRUE 
 18        4.13       NA                    59.0                4.13  TRUE 
 19      119.       2777.                   59.0               57.1   FALSE
 20       42.3       943.                   59.0               42.3   TRUE 
 21        0.647      NA                    59.0                0.647 TRUE 
 22       23.4      1696.                   59.0               23.4   TRUE 
 23        8.80      227.                   59.0                8.80  TRUE 
 24        6.84       NA                    59.0                6.84  TRUE 
 25        5.56      639.                   59.0                5.56  TRUE 
 26       19.3       273.                   59.0               19.3   TRUE 
 27        4.30       NA                    59.0                4.30  TRUE 
 28        5.39      317.                   59.0                5.39  TRUE 
 29       22.6       184.                   59.0               22.6   TRUE 
 30       50.7        NA                    59.0               50.7   TRUE 
 31        1.69      697.                   59.0                1.69  TRUE 
 32       57.9        77.2                  59.0               55.8   FALSE
 33       21.4        NA                    59.0               21.4   TRUE 
 34        8.34      163.                   59.0                8.34  TRUE 
 35       50.5      1339.                   59.0               50.5   TRUE 
 36       12.2        NA                    59.0               12.2   TRUE 
 37       39.5       119.                   59.0               39.5   TRUE 
 38       17.5       191.                   59.0               17.5   TRUE 
 39       43.8        NA                    59.0               43.8   TRUE 
 40       21.5      1983.                   59.0               21.5   TRUE 
 41       60.4       939.                   59.0               54.9   FALSE
 42       15.0        NA                    59.0               15.0   TRUE 
 43       50.7      1185.                   59.0               50.7   TRUE 
 44       44.7         0.371                59.0                0.371 FALSE
 45       16.7        NA                    59.0               16.7   TRUE 
 46        8.97      570.                   59.0                8.97  TRUE 
 47       34.2       258.                   59.0               34.2   TRUE 
 48        3.06       NA                    59.0                3.06  TRUE 
 49       10.1      1317.                   59.0               10.1   TRUE 
 50       19.5       922.                   59.0               19.5   TRUE 
 51        2.82       NA                    59.0                2.82  TRUE 
 52       20.6      5011.                   59.0               20.6   TRUE 
 53       80.6      1292.                   59.0               53.7   FALSE
 54        5.00       NA                    59.0                5.00  TRUE 
 55        5.05     1264.                   59.0                5.05  TRUE 
 56       15.2       635.                   59.0               15.2   TRUE 
 57       10.0        NA                    59.0               10.0   TRUE 
 58        7.50     1820.                   59.0                7.50  TRUE 
 59        3.54      374.                   59.0                3.54  TRUE 
 60       18.6        NA                    59.0               18.6   TRUE 
 61       33.0       483.                   59.0               33.0   TRUE 
 62       24.2      1835.                   59.0               24.2   TRUE 
 63       17.1        NA                    59.0               17.1   TRUE 
 64       79.7      2935.                   59.0               52.6   FALSE
 65       33.8       314.                   59.0               33.8   TRUE 
 66        4.13       NA                    59.0                4.13  TRUE 
 67       98.8       428.                   59.0               52.3   FALSE
 68        2.26     1753.                   59.0                2.26  TRUE 
 69       33.1        NA                    59.0               33.1   TRUE 
 70        5.54      952.                   59.0                5.54  TRUE 
 71      111.        523.                   59.0               51.9   FALSE
 72       13.5        NA                    59.0               13.5   TRUE 
 73       37.6       460.                   59.0               37.6   TRUE 
 74       13.3       147.                   59.0               13.3   TRUE 
 75       12.0        NA                    59.0               12.0   TRUE 
 76      150.        200.                   59.0               51.4   FALSE
 77        3.44       90.9                  59.0                3.44  TRUE 
 78       30.4        NA                    59.0               30.4   TRUE 
 79       34.8      2651.                   59.0               34.8   TRUE 
 80       40.3       793.                   59.0               40.3   TRUE 
 81       19.1        NA                    59.0               19.1   TRUE 
 82       38.9      2059.                   59.0               38.9   TRUE 
 83       55.7      2318.                   59.0               50.7   FALSE
 84       15.0        NA                    59.0               15.0   TRUE 
 85       13.5       629.                   59.0               13.5   TRUE 
 86        0.380     121.                   59.0                0.380 TRUE 
 87       48.0        NA                    59.0               48.0   TRUE 
 88        9.48      326.                   59.0                9.48  TRUE 
 89        2.88      168.                   59.0                2.88  TRUE 
 90       34.2        NA                    59.0               34.2   TRUE 
 91       67.8       822.                   59.0               49.9   FALSE
 92       17.7       168.                   59.0               17.7   TRUE 
 93        3.06       NA                    59.0                3.06  TRUE 
 94       17.8      1013.                   59.0               17.8   TRUE 
 95        8.82      349.                   59.0                8.82  TRUE 
 96        6.39       NA                    59.0                6.39  TRUE 
 97       25.2       522.                   59.0               25.2   TRUE 
 98       37.9       279.                   59.0               37.9   TRUE 
 99       11.4        NA                    59.0               11.4   TRUE 
100       27.5      1610.                   59.0               27.5   TRUE 
# ℹ 4,940 more rows
# ℹ 1 more variable: dropoutEvent <lgl>

Compare patientwise and patientWiseBasic

  • simulationType = "patientWise" around 80 times faster than simulationType = "patientWiseBasic" (yields identical results)
rejectAtLeastOne 
expectedNumberOfSubjects 
studyDuration 
analysisTime 
simulationType = `patientWise` 
[1] 0.81 0.23 0.04
[1] 838.4084 805.5559 767.6514
[1] 56.66045 47.40565 41.83233
         [,1]    [,2]     [,3]
[1,] 34.02338 33.2345 32.46559
[2,] 57.12243 53.7724 51.58138
0.47 sec elapsed

 simulationType = `patientWiseBasic` 
[1] 0.81 0.23 0.04
[1] 838.4084 805.5559 767.6514
[1] 56.66045 47.40565 41.83233
         [,1]    [,2]     [,3]
[1,] 34.02338 33.2345 32.46559
[2,] 57.12243 53.7724 51.58138
42.28 sec elapsed

Compare patientwise and testStatisticBased

  • Comparison of simulationType = "patientWise" and simulationType = "testStatisticBased" requires systematic investigation, as an example:
design <- getDesignInverseNormal(
  kMax = 2,
  typeOfDesign = "noEarlyEfficacy",
  alpha = 0.025,
  futilityBounds = 0
)

omegaMaxVector <- 0.7
typeOfShape <- "linear"
typeOfSelection <- "best"

testStatistic <- getSimulationMultiArmSurvival(
  design = design,
  activeArms = 2,         
  omegaMaxVector = omegaMaxVector,
  typeOfShape = typeOfShape,
  directionUpper = FALSE,
  typeOfSelection = typeOfSelection,
  plannedEvents = c(230, 460),
  #simulationType = "testStatisticBased",
  correlationComputation = "null",
  maxNumberOfIterations = maxNumberOfIterations,
  seed = 1234
) 

patientWise <- getSimulationMultiArmSurvival(
  design = design,
  activeArms = 2,         
  omegaMaxVector = omegaMaxVector,
  typeOfShape = typeOfShape,
  directionUpper = FALSE,
  typeOfSelection = typeOfSelection,
  plannedEvents = c(230, 460),
  piControl = getPiByMedian(18),    
  eventTime = 12,
  #simulationType = "patientWise",    
  maxNumberOfSubjects = 700,
  maxNumberOfIterations = maxNumberOfIterations,
  seed = 1234
) 

testStatistic$rejectAtLeastOne
[1] 0.867
patientWise$rejectAtLeastOne
[1] 0.843
testStatistic$cumulativeEventsPerStage
, , 1

         [,1]
[1,] 166.8627
[2,] 311.0205

, , 2

         [,1]
[1,] 153.3333
[2,] 373.4430
patientWise$cumulativeEventsPerStage
, , 1

         [,1]
[1,] 164.1740
[2,] 294.4734

, , 2

         [,1]
[1,] 152.8470
[2,] 368.0123
testStatistic$singleEventsPerStage
, , 1

         [,1]
[1,] 166.8627
[2,] 144.1577

, , 2

         [,1]
[1,] 153.3333
[2,] 220.1097
patientWise$singleEventsPerStage
, , 1

         [,1]
[1,] 164.1740
[2,] 130.2994

, , 2

         [,1]
[1,] 152.8470
[2,] 215.1653
testStatistic$singleEventsPerArmAndStage
, , 1

          [,1]
[1,] 76.666667
[2,]  9.890297

, , 2

         [,1]
[1,] 63.13725
[2,] 85.84226

, , 3

          [,1]
[1,]  90.19608
[2,] 134.26744
patientWise$singleEventsPerArmAndStage
, , 1

         [,1]
[1,] 77.15300
[2,] 14.83472

, , 2

         [,1]
[1,] 65.82600
[2,] 99.70062

, , 3

         [,1]
[1,]  87.0210
[2,] 115.4647

The Way How Events Were Counted

  • At the first stage, all active treatment arms and control contribute. At later stages, the event count is evaluated at the preceding analysis time using the arms retained for the new stage.
  • Specifically, events occurring in a dropped arm after its exclusion do not contribute to the subsequent stage targets.
  • Events occurring after the preceding analysis in previously recruited subjects in retained arms do contribute, as do events in newly recruited subjects.
  • If the required additional events cannot be observed under the simulated accrual, survival, and drop-out history, the event target is recorded as not achieved.
  • For example, consider D1 = 230 and D2 = 460, with one treatment arm retained after stage 1. If that treatment arm and control together have 153 observed events at the first analysis, the second analysis requires 230 additional events in this pair. Its cumulative target is therefore B2 = 153 + 230 = 383. Waiting for 460 cumulative events in this pair would instead require 307 additional events and would not implement the specified stage-wise event budget.

An Example using piecewiseSurvival

  • Consider two situations: a multiarm situation with delayed response (effect after 3 months larger for both treatment groups), and a multiarm situation with constant response (proportional hazard ratio)

  • A PiecewiseSurvivalTimeMultiArm object containing both cases can be defined and used as follows:

piecewiseTime <- getPiecewiseSurvivalTimeMultiArm(
  piecewiseSurvivalTime = c(0, 3), 
  lambdaControl = c(0.10, 0.15),
  hazardRatio = list(
    delayed = rbind(A = c(1, 0.55), B = c(0.9, 0.65)),
    constant = rbind(A = c(0.75, 0.75), B = c(0.65, 0.65))
  )
)
getSimulationMultiArmSurvival(
  piecewiseSurvivalTime = piecewiseTime, 
  plannedEvents = 100, 
  accrualTime = c(0, 4), 
  accrualIntensity = 100,
  maxNumberOfIterations = maxNumberOfIterations, 
  seed = 7301
) |> summary()

An Example using piecewiseSurvival

Simulation of a survival endpoint (multi-arm design)

Fixed sample analysis, one-sided significance level 2.5%. The results were obtained using patient-level simulation for a multi-arm logrank test (2 treatments vs. control), H0: hazard ratio(i) = 1, power directed towards smaller values, H1: piecewise exponential survival distribution with interval start times = c(0, 3) (last interval open-ended), common control hazards = c(0.1, 0.15), hazard ratios for delayed (in interval order): A = c(1, 0.55); B = c(0.9, 0.65), hazard ratios for constant (in interval order): A = c(0.75, 0.75); B = c(0.65, 0.65), planned events = 100, accrual time = 4, accrual intensity = 100, effect shape = user defined, intersection test = Dunnett, success criterion: all, simulation runs = 1000, seed = 7301.

Stage Fixed
Stage level (one-sided) 0.0250
Efficacy boundary (z-value scale) 1.960
Reject at least one, situation = delayed 0.0860
Reject at least one, situation = constant 0.4020
Rejected arms, situation = delayed
Treatment arm 1 vs. control 0.0350
Treatment arm 2 vs. control 0.0710
Rejected arms, situation = constant
Treatment arm 1 vs. control 0.2030
Treatment arm 2 vs. control 0.3650
Number of subjects, situation = delayed 400.0
Number of subjects, situation = constant 400.0
Cumulative number of events, situation = delayed
Treatment arm 1 vs. control 68.9
Treatment arm 2 vs. control 66.9
Cumulative number of events, situation = constant
Treatment arm 1 vs. control 72.0
Treatment arm 2 vs. control 68.3
Analysis time, situation = delayed 5.00
Analysis time, situation = constant 5.37
Expected study duration, situation = delayed 5.00
Expected study duration, situation = constant 5.37

Legend:

  • (i): results of treatment arm i vs. control arm

Calculation of Dropout Proportions

  • At given dropoutRate1 and dropoutRate2 at dropoutTime the expected dropout proportions at analysis times are calculated

  • In multi-arm designs, dropoutRates1 can also be a vector referring to the dropout specification in the multiple arms

  • Calculated result available in getSampleSizeSurvival(), getPowerSurvival(), getSimulationSurvival(), getSimulationMultiArmSurvival(), and getSimulationEnrichmentSurvival()

  • This is an example:

getSimulationMultiArmSurvival(
  design = getDesignInverseNormal(),
  omegaMaxVector = 0.7,
  piControl = 0.3,
  directionUpper = FALSE,
  plannedEvents = c(50, 100, 150), 
  maxNumberOfSubjects = 400,
  maxNumberOfIterations = maxNumberOfIterations,
  dropoutRate1 = c(0.05, 0.06, 0.07),
  #dropoutRate1 = 0.05,
  dropoutRate2 = 0.05,
  seed = 7301
) |> summary()

Calculation of Dropout Proportions

Simulation of a survival endpoint (multi-arm design)

Sequential analysis with a maximum of three looks (inverse normal combination test design), one-sided overall significance level 2.5%. The results were obtained using patient-level simulation for a multi-arm logrank test (3 treatments vs. control), H0: hazard ratio(i) = 1, power directed towards smaller values, H1: omega_max = 0.7, control rate pi(control) = 0.3, planned cumulative events = c(50, 100, 150), maximum number of subjects = 400, event time = 12, accrual time = 12, accrual intensity = 0.1, dropout rate(1) = c(0.05, 0.06, 0.07), dropout rate(2) = 0.05, dropout time = 12, effect shape = linear, dose levels = c(1, 2, 3), intersection test = Dunnett, selection = best, effect measure based on effect estimate, success criterion: all, simulation runs = 1000, seed = 7301.

Effect shape:

Situation 1
Arm 1 0.9
Arm 2 0.8
Arm 3 0.7
Stage 1 2 3
Fixed weight 0.577 0.577 0.577
Cumulative alpha spent 0.0003 0.0072 0.0250
Stage levels (one-sided) 0.0003 0.0071 0.0225
Efficacy boundary (z-value scale) 3.471 2.454 2.004
Reject at least one 0.3520
Rejected arms per stage
Treatment arm 1 vs. control 0 0.0060 0.0140
Treatment arm 2 vs. control 0.0020 0.0250 0.0540
Treatment arm 3 vs. control 0.0030 0.0750 0.1730
Number of subjects 379.6
Expected number of subjects 400.0
Cumulative number of events
Treatment arm 1 vs. control 27.8 59.2 90.1
Treatment arm 2 vs. control 26.1 60.9 95.2
Treatment arm 3 vs. control 24.8 63.1 100.4
Expected number of events 144.5
Selected arms
Treatment arm 1 vs. control 1.0000 0.1690 0.1630
Treatment arm 2 vs. control 1.0000 0.3240 0.2970
Treatment arm 3 vs. control 1.0000 0.5070 0.4290
Number of selected active arms 3.000
Analysis time 11.53
Expected study duration 43.96
Conditional power (achieved)
Stopping probability by stage 0 0.1110
Efficacy stopping probability by stage 0 0.1110
Observed drop-out proportion
Treatment arm 1 0.0219 0.0552 0.0942
Treatment arm 2 0.0271 0.0750 0.1246
Treatment arm 3 0.0317 0.0911 0.1540
Control 0.0219 0.0562 0.0927

Legend:

  • (i): results of treatment arm i vs. control arm
  • [j]: effect shape situation j
getSimulationSurvival(
  design = getDesignInverseNormal(),
  pi1 = c(0.2, 0.3),
  pi2 = 0.3,
  directionUpper = FALSE,
  plannedEvents = c(50, 100, 150), 
  maxNumberOfSubjects = 300,
  maxNumberOfIterations = maxNumberOfIterations,
  dropoutRate1 = 0.05,
  dropoutRate2 = 0.05
) |> summary()

Simulation of a survival endpoint

Sequential analysis with a maximum of three looks (inverse normal combination test design), one-sided overall significance level 2.5%. The results were obtained using patient-level simulation for a two-sample logrank test, H0: hazard ratio = 1, power directed towards smaller values, H1: treatment pi(1) as specified, control pi(2) = 0.3, planned cumulative events = c(50, 100, 150), maximum number of subjects = 300, event time = 12, accrual time = 12, accrual intensity = 25, dropout rate(1) = 0.05, dropout rate(2) = 0.05, dropout time = 12, simulation runs = 1000, seed = 49247477.

Stage 1 2 3
Fixed weight 0.577 0.577 0.577
Cumulative alpha spent 0.0003 0.0072 0.0250
Stage levels (one-sided) 0.0003 0.0071 0.0225
Efficacy boundary (z-value scale) 3.471 2.454 2.004
Cumulative power, pi(1) = 0.2 0.0340 0.4540 0.8130
Cumulative power, pi(1) = 0.3 0 0.0120 0.0330
Number of subjects, pi(1) = 0.2 299.7 300.0 300.0
Number of subjects, pi(1) = 0.3 295.9 300.0 300.0
Expected number of subjects, pi(1) = 0.2 300.0
Expected number of subjects, pi(1) = 0.3 300.0
Cumulative number of events, pi(1) = 0.2 50.0 100.0 150.0
Cumulative number of events, pi(1) = 0.3 50.0 100.0 150.0
Expected number of events, pi(1) = 0.2 125.6
Expected number of events, pi(1) = 0.3 149.4
Analysis time, pi(1) = 0.2 13.89 23.91 37.85
Analysis time, pi(1) = 0.3 12.45 20.37 31.16
Expected study duration, pi(1) = 0.2 31.18
Expected study duration, pi(1) = 0.3 31.02
Conditional power (achieved), pi(1) = 0.2 0.4546 0.5196
Conditional power (achieved), pi(1) = 0.3 0.0622 0.0626
Stopping probability by stage, pi(1) = 0.2 0.0340 0.4200
Stopping probability by stage, pi(1) = 0.3 0 0.0120
Efficacy stopping probability by stage, pi(1) = 0.2 0.0340 0.4200
Efficacy stopping probability by stage, pi(1) = 0.3 0 0.0120
Observed drop-out proportion (1), pi(1) = 0.2 0.0305 0.0620 0.0941
Observed drop-out proportion (1), pi(1) = 0.3 0.0241 0.0482 0.0718
Observed drop-out proportion (2), pi(1) = 0.2 0.0289 0.0563 0.0849
Observed drop-out proportion (2), pi(1) = 0.3 0.0238 0.0471 0.0714

Legend:

  • (i): values of treatment arm i
getPowerSurvival(
  design = getDesignInverseNormal(),
  pi1 = c(0.2, 0.3),
  pi2 = 0.3,
  directionUpper = FALSE,
  maxNumberOfEvents = 250, 
  maxNumberOfSubjects = 300,
  dropoutRate1 = 0.05,
  dropoutRate2 = 0.05
) |> summary()

Power calculation for a survival endpoint

Sequential analysis with a maximum of three looks (inverse normal combination test design), one-sided overall significance level 2.5%. The results were calculated for a two-sample logrank test, H0: hazard ratio = 1, power directed towards smaller values, H1: treatment pi(1) as specified, control pi(2) = 0.3, maximum number of subjects = 300, maximum number of events = 250, event time = 12, accrual time = 12, accrual intensity = 25, dropout rate(1) = 0.05, dropout rate(2) = 0.05, dropout time = 12.

Stage 1 2 3
Fixed weight 0.577 0.577 0.577
Cumulative alpha spent 0.0003 0.0072 0.0250
Stage levels (one-sided) 0.0003 0.0071 0.0225
Efficacy boundary (z-value scale) 3.471 2.454 2.004
Efficacy boundary (t) 0.467 0.684 0.776
Cumulative power, pi(1) = 0.2 0.0917 0.7173 0.9573
Cumulative power, pi(1) = 0.3 0.0003 0.0072 0.0250
Number of subjects, pi(1) = 0.2 300.0 300.0 300.0
Number of subjects, pi(1) = 0.3 300.0 300.0 300.0
Expected number of subjects, pi(1) = 0.2 300.0
Expected number of subjects, pi(1) = 0.3 300.0
Cumulative number of events 83.3 166.7 250.0
Expected number of events, pi(1) = 0.2 182.6
Expected number of events, pi(1) = 0.3 249.4
Analysis time, pi(1) = 0.2 20.23 44.48 173.41
Analysis time, pi(1) = 0.3 17.45 35.89 96.25
Expected study duration, pi(1) = 0.2 78.71
Expected study duration, pi(1) = 0.3 95.81
Stopping probability, pi(1) = 0.2 0.7173
Stopping probability, pi(1) = 0.3 0.0072
Efficacy stopping probability by stage (under H0) 0.0003 0.0069
Efficacy stopping probability by stage, pi(1) = 0.2 0.0917 0.6256
Efficacy stopping probability by stage, pi(1) = 0.3 0.0003 0.0069
Expected drop-out proportion (1), pi(1) = 0.2 0.0515 0.1091 0.1828
Expected drop-out proportion (1), pi(1) = 0.3 0.0399 0.0799 0.1198
Expected drop-out proportion (2), pi(1) = 0.2 0.0477 0.0915 0.1253
Expected drop-out proportion (2), pi(1) = 0.3 0.0399 0.0799 0.1198

Legend:

  • (t): treatment effect scale
getSampleSizeSurvival(
  design = getDesignInverseNormal(),
  pi1 = c(0.2, 0.12),
  pi2 = 0.3,
  directionUpper = FALSE,
  maxNumberOfSubjects = 600,
  dropoutRate1 = 0.05,
  dropoutRate2 = 0.05
) |> summary()

Sample size calculation for a survival endpoint

Sequential analysis with a maximum of three looks (inverse normal combination test design), one-sided overall significance level 2.5%. The results were calculated for a two-sample logrank test, H0: hazard ratio = 1, H1: treatment pi(1) as specified, control pi(2) = 0.3, event time = 12, accrual time = 12, accrual intensity = 50, dropout rate(1) = 0.05, dropout rate(2) = 0.05, dropout time = 12.

Stage 1 2 3
Fixed weight 0.577 0.577 0.577
Cumulative alpha spent 0.0003 0.0072 0.0250
Stage levels (one-sided) 0.0003 0.0071 0.0225
Efficacy boundary (z-value scale) 3.471 2.454 2.004
Efficacy boundary (t), pi(1) = 0.2 0.369 0.607 0.717
Efficacy boundary (t), pi(1) = 0.12 0.113 0.336 0.483
Cumulative power 0.0329 0.4424 0.8000
Number of subjects, pi(1) = 0.2 468.3 600.0 600.0
Number of subjects, pi(1) = 0.12 228.7 326.5 402.7
Expected number of subjects, pi(1) = 0.2 595.7
Expected number of subjects, pi(1) = 0.12 365.7
Cumulative number of events, pi(1) = 0.2 48.4 96.8 145.2
Cumulative number of events, pi(1) = 0.12 10.1 20.2 30.3
Expected number of events, pi(1) = 0.2 122.2
Expected number of events, pi(1) = 0.12 25.5
Analysis time, pi(1) = 0.2 9.37 13.62 18.06
Analysis time, pi(1) = 0.12 4.57 6.53 8.05
Expected study duration, pi(1) = 0.2 15.95
Expected study duration, pi(1) = 0.12 7.31
Stopping probability 0.4424
Efficacy stopping probability by stage (under H0) 0.0003 0.0069
Efficacy stopping probability by stage 0.0329 0.4095
Expected drop-out proportion (1), pi(1) = 0.2 0.0187 0.0294 0.0446
Expected drop-out proportion (1), pi(1) = 0.12 0.00956 0.01351 0.01654
Expected drop-out proportion (2), pi(1) = 0.2 0.0181 0.0280 0.0417
Expected drop-out proportion (2), pi(1) = 0.12 0.00929 0.01298 0.01574

Legend:

  • (t): treatment effect scale

Enrichment Changes and Enhancements

Adaptive Enrichment Survival Designs Using rpact

  • Complete analogue extension of getSimulationEnrichmentSurvival() as in getSimulationMultiArmSurvival()

  • Previous version: Simulates log-rank statistics using information based on estimated event numbers in the subsets 1,…,M (see documentation)

  • New version: log-rank statistics are now calculated directly from simulated data sets

  • Fast and flexible implementation following the approach of getSimulationMultiArmSurvival()

  • We restrict the presentation here to introducing the new option and illustrating its use with an example.

Simulation Enrichment Survival New Options

getSimulationEnrichmentSurvival(effectList = , plannedEvents = )

  • …

  • simulationType Character value specifying the simulation approach: "auto", "patientWise", "testStatisticBased", or "patientWiseBasic". If "auto" is specified, the simulation type is selected automatically based on the explicitly specified arguments. If patient-wise-specific arguments such as piControl, eventTime, accrualTime, accrualIntensity, accrualIntensityType, dropoutRate1, dropoutRate2, dropoutTime, maxNumberOfSubjects, or kappa are provided, a patient-wise simulation approach is used; otherwise the test-statistic-based simulation is used for backward compatibility.

  • thetaH0 The null hypothesis value as compared to the control, default is 0 for general estimates, the normal case, and the binary case, it is 1 for the survival case (testing the hazard ratio).

    For non-inferiority designs, thetaH0 is the non-inferiority bound. That is, in case of (one-sided) testing of

    • general estimates: a value on the scale of the supplied estimates can be specified.

    • means: a value != 0 (or a value != 1 for testing the mean ratio) can be specified.

    • rates: a value != 0 (or a value != 1 for testing the risk ratio pi1 / pi2) can be specified.

    • survival data: a bound for testing H0: hazard ratio = thetaH0 != 1 can be specified.

    • count data: a bound for testing H0: lambda1 / lambda2 = thetaH0 != 1 can be specified.

  • maxNumberOfSubjects needs to be specified for simulationType not equal "testStatisticBased". If accrual time and accrual intensity are specified, this will be calculated. Must be a positive integer of length 1.

  • piControls in effectList need to be specified for simulationType = "patientWiseBasic"

  • eventTime The assumed time under which the event rates are calculated, default is 12.

    effectList List of subsets, prevalences, and effect sizes with columns and number of rows reflecting the different situations to consider (see examples). For a piecewise exponential patient-wise survival simulation, specify subGroups, prevalences, and piecewiseSurvivalTime, where the latter is a PiecewiseSurvivalTimeEnrichment object created by getPiecewiseSurvivalTimeEnrichment(). Its subgroup names and the order of subGroups must agree. In this case, do not also specify piControls, piTreatments, or hazardRatios.

  • piecewiseSurvivalTime A PiecewiseSurvivalTimeEnrichment objectcreated by getPiecewiseSurvivalTimeEnrichment(). It specifies common interval start times, the control hazard in every interval, and an active-arm-by-interval hazard-ratio matrix for every situation. It can only be used for patient-wise simulation with kappa = 1, and cannot be combined with piControl or effectMatrix.

  • accrualTime The assumed accrual time intervals for the study, default is c(0, 12) (for details see getAccrualTime()).

  • accrualIntensity A numeric vector of accrual intensities, default is the relative intensity 0.1 (for details see getAccrualTime()).

  • accrualIntensityType A character value specifying the accrual intensity input type. Must be one of "auto", "absolute", or "relative"; default is "auto", i.e., if all values are < 1 the type is "relative", otherwise it is "absolute".

  • dropoutRate1 The assumed drop-out rate in the treatment group, default is 0. For multi-arm simulations, this can be a vector of length equal to the number of active arms, specifying different drop-out rates for each active arm.

  • dropoutRate2 The assumed drop-out rate in the control group, default is 0.

  • dropoutTime The assumed time for drop-out rates in the control and the treatment group, default is 12.

  • maxNumberOfRawDatasetsPerStage The maximum number of patient-level datasets to retain for each scenario and stopping stage. The default is 0, which retains no patient-level data. Use getRawData() to retrieve retained datasets.

  • kappa A numeric value > 0. A kappa != 1 will be used for the specification of the shape of the Weibull distribution. Default is 1, i.e., the exponential survival distribution is used instead of the Weibull distribution. Note that the Weibull distribution cannot be used for the piecewise definition of the survival time distribution, i.e., only piecewiselambda (as a single value) and kappa can be specified. This function is equivalent to pweibull(q = time, shape = kappa, scale = 1 / lambda) of the stats package. For example, getPiecewiseExponentialDistribution(time = 130, piecewiseLambda = 0.01, kappa = 4.2) and pweibull(q = 130, shape = 4.2, scale = 1 / 0.01) provide the same result.

Example G = 2: Effect list defined through event rates yielding a range of hazard ratios in the subsets

Consider 3 situations for hazard ratios in the two subgroups

# Define effect list

maxNumberOfIterations <- 1000

subGroups <- c("S", "R") 
prevalences <- c(0.40, 0.60) 
piControls <- c(0.3, 0.4) 
effectRangeS <- seq(0, 0.2, 0.1) 
effectRangeR <- rep(0.05, length(effectRangeS)) 
hazardRatios <- matrix(c(log(1 - piControls[1] + effectRangeS) / log(1 - piControls[1]),
                      log(1 - piControls[2] + effectRangeR) / log(1 - piControls[2])), 
                      byrow = FALSE, ncol = 2) 
effectList <- list(
  subGroups = subGroups, 
  prevalences = prevalences,
  piControls = piControls,
  hazardRatios = hazardRatios) 

print(effectList)
$subGroups
[1] "S" "R"

$prevalences
[1] 0.4 0.6

$piControls
[1] 0.3 0.4

$hazardRatios
          [,1]      [,2]
[1,] 1.0000000 0.8433072
[2,] 0.6256216 0.8433072
[3,] 0.2953965 0.8433072
x <- getSimulationEnrichmentSurvival(
  design = getDesignFisher(kMax = 2),
  effectList = effectList,
  directionUpper = FALSE,
  typeOfSelection = "best",
  #typeOfSelection = "all",
  plannedEvents = c(100, 200),
  maxNumberOfIterations = maxNumberOfIterations
)

y <- getSimulationEnrichmentSurvival(
  design = getDesignFisher(kMax = 2),
  effectList = effectList,
  directionUpper = FALSE,
  typeOfSelection = "best",
  #typeOfSelection = "all",
  eventTime = 12,
  maxNumberOfSubjects = 430,
  plannedEvents = c(100, 200),
  dropoutRate1 = 0.04,
  dropoutRate2 = 0.04,
  maxNumberOfIterations = maxNumberOfIterations
)

x$rejectAtLeastOne
[1] 0.048 0.596 0.998
x$cumulativeEventsPerStage          
     [,1] [,2] [,3]
[1,]  100  100  100
[2,]  200  200  200
x$expectedNumberOfEvents
[1] 199.4 190.6 149.0
x$singleEventsPerSubsetAndStage
, , 1

         [,1]     [,2]     [,3]
[1,] 34.78261 30.76923 26.22951
[2,] 56.56548 80.28528 98.49448

, , 2

         [,1]     [,2]     [,3]
[1,] 65.21739 69.23077 73.77049
[2,] 43.43452 19.71472  1.50552
x$populationEventsPerStage  
, , 1

         [,1]     [,2]     [,3]
[1,] 34.78261 30.76923 26.22951
[2,] 33.40040 71.52318 97.95918

, , 2

         [,1]      [,2]       [,3]
[1,] 100.0000 100.00000 100.000000
[2,]  66.5996  28.47682   2.040816
x$expectedNumberOfSubjects
NULL
y$rejectAtLeastOne
[1] 0.060 0.625 0.985
y$cumulativeEventsPerStage
     [,1] [,2] [,3]
[1,]  100  100  100
[2,]  200  200  200
y$expectedNumberOfEvents
[1] 199.3 191.3 155.6
y$singleEventsPerSubsetAndStage
, , 1

         [,1]     [,2]     [,3]
[1,] 34.39900 30.87800 26.00100
[2,] 56.69526 82.41189 98.71023

, , 2

         [,1]     [,2]      [,3]
[1,] 65.60200 69.12300 73.999000
[2,] 43.30474 17.58811  1.289773
y$populationEventsPerStage  
, , 1

     [,1] [,2] [,3]
[1,] 34.4 30.9 26.0
[2,] 31.7 73.5 98.1

, , 2

      [,1]  [,2]  [,3]
[1,] 100.0 100.0 100.0
[2,]  68.3  26.5   1.9
y$expectedNumberOfSubjects
[1] 429.9999 429.9985 430.0000
summary(y)     

Simulation of a survival endpoint (enrichment design)

Sequential analysis with a maximum of two looks (Fisher’s combination test design), one-sided overall significance level 2.5%. The results were obtained using patient-level simulation for a population enrichment logrank test (treatment vs. control, 2 populations), H0: hazard ratio = 1, power directed towards smaller values, H1: hazard ratios as specified, subgroups = c(S, R), prevalences = c(0.4, 0.6), control rates pi(control) = c(0.3, 0.4), planned cumulative events = c(100, 200), maximum number of subjects = 430, event time = 12, accrual time = c(0, 12), dropout rate(1) = 0.04, dropout rate(2) = 0.04, dropout time = 12, intersection test = Simes, selection = best, effect measure based on effect estimate, success criterion: all, simulation runs = 1000, seed = -943541704.

Stage 1 2
Fixed weight 1 1
Cumulative alpha spent 0.0158 0.0250
Stage levels (one-sided) 0.0158 0.0158
Efficacy boundary (p product scale) 0.015788 0.002221
Reject at least one, hazard ratios = c(1, 0.843) 0.0600
Reject at least one, hazard ratios = c(0.626, 0.843) 0.6250
Reject at least one, hazard ratios = c(0.295, 0.843) 0.9850
Rejected populations per stage, hazard ratios = c(1, 0.843)
Subpopulation S 0.0110 0.0040
Full population F 0.0330 0.0200
Rejected populations per stage, hazard ratios = c(0.626, 0.843)
Subpopulation S 0.1490 0.3980
Full population F 0.1480 0.0400
Rejected populations per stage, hazard ratios = c(0.295, 0.843)
Subpopulation S 0.7170 0.2590
Full population F 0.4660 0.0060
Success per stage, hazard ratios = c(1, 0.843) 0.0070 0.0490
Success per stage, hazard ratios = c(0.626, 0.843) 0.0870 0.5340
Success per stage, hazard ratios = c(0.295, 0.843) 0.4440 0.5260
Number of subjects, hazard ratios = c(1, 0.843) 430.0 430.0
Number of subjects, hazard ratios = c(0.626, 0.843) 430.0 430.0
Number of subjects, hazard ratios = c(0.295, 0.843) 430.0 430.0
Expected number of subjects, hazard ratios = c(1, 0.843) 430.0
Expected number of subjects, hazard ratios = c(0.626, 0.843) 430.0
Expected number of subjects, hazard ratios = c(0.295, 0.843) 430.0
Number of events per population, hazard ratios = c(1, 0.843)
Subpopulation S 34.4 31.7
Full population F 100.0 68.3
Number of events per population, hazard ratios = c(0.626, 0.843)
Subpopulation S 30.9 73.5
Full population F 100.0 26.5
Number of events per population, hazard ratios = c(0.295, 0.843)
Subpopulation S 26.0 98.1
Full population F 100.0 1.9
Events not achieved, hazard ratios = c(1, 0.843) 0 <0.1
Events not achieved, hazard ratios = c(0.626, 0.843) 0 <0.1
Events not achieved, hazard ratios = c(0.295, 0.843) 0 <0.1
Expected number of events, hazard ratios = c(1, 0.843) 199.3
Expected number of events, hazard ratios = c(0.626, 0.843) 191.3
Expected number of events, hazard ratios = c(0.295, 0.843) 155.6
Selected populations, hazard ratios = c(1, 0.843)
Subpopulation S 1.0000 0.3140
Full population F 1.0000 0.6770
Selected populations, hazard ratios = c(0.626, 0.843)
Subpopulation S 1.0000 0.6670
Full population F 1.0000 0.2410
Selected populations, hazard ratios = c(0.295, 0.843)
Subpopulation S 1.0000 0.5180
Full population F 1.0000 0.0100
Number of populations, hazard ratios = c(1, 0.843) 2.000 1.000
Number of populations, hazard ratios = c(0.626, 0.843) 2.000 1.000
Number of populations, hazard ratios = c(0.295, 0.843) 2.000 1.000
Analysis time, hazard ratios = c(1, 0.843) 13.85 39.03
Analysis time, hazard ratios = c(0.626, 0.843) 14.42 70.10
Analysis time, hazard ratios = c(0.295, 0.843) 15.03 142.93
Expected study duration, hazard ratios = c(1, 0.843) 38.85
Expected study duration, hazard ratios = c(0.626, 0.843) 65.26
Expected study duration, hazard ratios = c(0.295, 0.843) 86.15
Conditional power (achieved), hazard ratios = c(1, 0.843) 0.0745
Conditional power (achieved), hazard ratios = c(0.626, 0.843) 0.2881
Conditional power (achieved), hazard ratios = c(0.295, 0.843) 0.6519
Stopping probability by stage, hazard ratios = c(1, 0.843) 0.0070
Stopping probability by stage, hazard ratios = c(0.626, 0.843) 0.0870
Stopping probability by stage, hazard ratios = c(0.295, 0.843) 0.4440
Observed drop-out proportion (1), hazard ratios = c(1, 0.843)
Subpopulation S 0.0231 0.0939
Full population F 0.0228 0.0464
Observed drop-out proportion (1), hazard ratios = c(0.626, 0.843)
Subpopulation S 0.0258 0.1274
Full population F 0.0246 0.0513
Observed drop-out proportion (1), hazard ratios = c(0.295, 0.843)
Subpopulation S 0.0294 0.2182
Full population F 0.0268 0.0526
Observed drop-out proportion (2), hazard ratios = c(1, 0.843)
Subpopulation S 0.0230 0.0846
Full population F 0.0224 0.0443
Observed drop-out proportion (2), hazard ratios = c(0.626, 0.843)
Subpopulation S 0.0244 0.0928
Full population F 0.0238 0.0471
Observed drop-out proportion (2), hazard ratios = c(0.295, 0.843)
Subpopulation S 0.0265 0.1004
Full population F 0.0247 0.0460

Legend:

  • (i): values of treatment arm i

Summary

  • Flexible way to specify simulations for multi-arm and enrichment survival designs on the patientwise level

  • Estimation of analysis times, expected study duration, patient number, expected dropout proportions, etc. is possible now

  • Predefined parameter configurations for ease of use

  • Support for piecewise exponentially distributed survival times in the current prototype release, using piecewiseSurvivalTime = getPiecewiseMultiArmSurvivalTime() or piecewiseSurvivalTime = getPiecewiseEnrichmentSurvivalTime()

  • Multiple Survival time options can be specified, including a fixed observation period

  • Surrogate-based selection will be implemented in the next release.

References

Deng, Qiqi, Xiaofei Bai, Dacheng Liu, Dooti Roy, Zhiliang Ying, and Dan-Yu Lin. 2019. “Power and Sample Size for Dose-Finding Studies with Survival Endpoints Under Model Uncertainty.” Biometrics 75 (1): 308–14.
König, F., W. Brannath, F. Bretz, and M. Posch. 2008. “Adaptive Dunnett Tests for Treatment Selection.” Statistics in Medicine 27: 1612–25.
Wassmer, Gernot, and Werner Brannath. 2025. Group Sequential and Confirmatory Adaptive Designs in Clinical Trials. 2nd ed. Springer. https://link.springer.com/book/10.1007/978-3-031-89669-9.