getSimulationMultiArmSurvival {rpact}  R Documentation 
Returns the simulated power, stopping and selection probabilities, conditional power, and
expected sample size for testing hazard ratios in a multiarm treatment groups testing situation.
In contrast to getSimulationSurvival()
(where survival times are simulated), normally
distributed logrank test statistics are simulated.
getSimulationMultiArmSurvival(
design = NULL,
...,
activeArms = 3L,
effectMatrix = NULL,
typeOfShape = c("linear", "sigmoidEmax", "userDefined"),
omegaMaxVector = seq(1, 2.6, 0.4),
gED50 = NA_real_,
slope = 1,
intersectionTest = c("Dunnett", "Bonferroni", "Simes", "Sidak", "Hierarchical"),
directionUpper = TRUE,
adaptations = NA,
typeOfSelection = c("best", "rBest", "epsilon", "all", "userDefined"),
effectMeasure = c("effectEstimate", "testStatistic"),
successCriterion = c("all", "atLeastOne"),
correlationComputation = c("alternative", "null"),
epsilonValue = NA_real_,
rValue = NA_real_,
threshold = Inf,
plannedEvents = NA_real_,
allocationRatioPlanned = NA_real_,
minNumberOfEventsPerStage = NA_real_,
maxNumberOfEventsPerStage = NA_real_,
conditionalPower = NA_real_,
thetaH1 = NA_real_,
maxNumberOfIterations = 1000L,
seed = NA_real_,
calcEventsFunction = NULL,
selectArmsFunction = NULL,
showStatistics = FALSE
)
design 
The trial design. If no trial design is specified, a fixed sample size design is used.
In this case, Type I error rate 
... 
Ensures that all arguments (starting from the "...") are to be named and that a warning will be displayed if unknown arguments are passed. 
activeArms 
The number of active treatment arms to be compared with control, default is 
effectMatrix 
Matrix of effect sizes with 
typeOfShape 
The shape of the doseresponse relationship over the treatment groups.
This can be either 
omegaMaxVector 
Range of hazard ratios with highest response for 
gED50 
If 
slope 
If 
intersectionTest 
Defines the multiple test for the intersection
hypotheses in the closed system of hypotheses.
Five options are available in multiarm designs: 
directionUpper 
Logical. Specifies the direction of the alternative,
only applicable for onesided testing; default is 
adaptations 
A logical vector of length 
typeOfSelection 
The way the treatment arms or populations are selected at interim.
Five options are available: 
effectMeasure 
Criterion for treatment arm/population selection, either based on test statistic
( 
successCriterion 
Defines when the study is stopped for efficacy at interim.
Two options are available: 
correlationComputation 
If 
epsilonValue 
For 
rValue 
For 
threshold 
Selection criterion: treatment arm / population is selected only if 
plannedEvents 

allocationRatioPlanned 
The planned allocation ratio 
minNumberOfEventsPerStage 
When performing a data driven sample size recalculation,
the numeric vector 
maxNumberOfEventsPerStage 
When performing a data driven sample size recalculation,
the numeric vector 
conditionalPower 
If 
thetaH1 
If specified, the value of the alternative under which the conditional power or sample size recalculation calculation is performed. Must be a numeric of length 1. 
maxNumberOfIterations 
The number of simulation iterations, default is 
seed 
The seed to reproduce the simulation, default is a random seed. 
calcEventsFunction 
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

selectArmsFunction 
Optionally, a function can be entered that defines the way of how treatment arms
are selected. This function is allowed to depend on 
showStatistics 
Logical. If 
At given design the function simulates the power, stopping probabilities, selection probabilities, and expected sample size at given number of subjects, parameter configuration, and treatment arm selection rule in the multiarm situation. An allocation ratio can be specified referring to the ratio of number of subjects in the active treatment groups as compared to the control group.
The definition of thetaH1
makes only sense if kMax
> 1
and if conditionalPower
, minNumberOfEventsPerStage
, and
maxNumberOfEventsPerStage
(or calcEventsFunction
) are defined.
calcEventsFunction
This function returns the number of events at given conditional power
and conditional critical value for specified testing situation.
The function might depend on the variables
stage
,
selectedArms
,
plannedEvents
,
directionUpper
,
allocationRatioPlanned
,
minNumberOfEventsPerStage
,
maxNumberOfEventsPerStage
,
conditionalPower
,
conditionalCriticalValue
, and
overallEffects
.
The function has to contain the threedots argument '...' (see examples).
Returns a SimulationResults
object.
The following generics (R generic functions) are available for this object:
names()
to obtain the field names,
print()
to print the object,
summary()
to display a summary of the object,
plot()
to plot the object,
as.data.frame()
to coerce the object to a data.frame
,
as.matrix()
to coerce the object to a matrix
.
Click on the link of a generic in the list above to go directly to the help documentation of
the rpact
specific implementation of the generic.
Note that you can use the R function methods
to get all the methods of a generic and
to identify the object specific name of it, e.g.,
use methods("plot")
to get all the methods for the plot
generic.
There you can find, e.g., plot.AnalysisResults
and
obtain the specific help documentation linked above by typing ?plot.AnalysisResults
.
# Assess different selection rules for a twostage survival design with
# O'Brien & Fleming alpha spending boundaries and (nonbinding) stopping
# for futility if the test statistic is negative.
# Number of events at the second stage is adjusted based on conditional
# power 80% and specified minimum and maximum number of Events.
maxNumberOfIterations < 50
design < getDesignInverseNormal(typeOfDesign = "asOF", futilityBounds = 0)
y1 < getSimulationMultiArmSurvival(design = design, activeArms = 4,
intersectionTest = "Simes", typeOfShape = "sigmoidEmax",
omegaMaxVector = seq(1, 2, 0.5), gED50 = 2, slope = 4,
typeOfSelection = "best", conditionalPower = 0.8,
minNumberOfEventsPerStage = c(NA_real_, 30),
maxNumberOfEventsPerStage = c(NA_real_, 90),
maxNumberOfIterations = maxNumberOfIterations,
plannedEvents = c(75, 120))
y2 < getSimulationMultiArmSurvival(design = design, activeArms = 4,
intersectionTest = "Simes", typeOfShape = "sigmoidEmax",
omegaMaxVector = seq(1,2,0.5), gED50 = 2, slope = 4,
typeOfSelection = "epsilon", epsilonValue = 0.2,
effectMeasure = "effectEstimate",
conditionalPower = 0.8, minNumberOfEventsPerStage = c(NA_real_, 30),
maxNumberOfEventsPerStage = c(NA_real_, 90),
maxNumberOfIterations = maxNumberOfIterations,
plannedEvents = c(75, 120))
y1$effectMatrix
y1$rejectAtLeastOne
y2$rejectAtLeastOne
y1$selectedArms
y2$selectedArms