getSimulationMultiArmRates {rpact}  R Documentation 
Returns the simulated power, stopping probabilities, conditional power, and expected sample size for testing rates in a multiarm treatment groups testing situation.
getSimulationMultiArmRates( design = NULL, ..., activeArms = 3L, effectMatrix = NULL, typeOfShape = c("linear", "sigmoidEmax", "userDefined"), piMaxVector = seq(0.2, 0.5, 0.1), piControl = 0.2, 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("effectDifference", "testStatistic"), successCriterion = c("all", "atLeastOne"), epsilonValue = NA_real_, rValue = NA_real_, threshold = Inf, plannedSubjects = NA_real_, allocationRatioPlanned = NA_real_, minNumberOfSubjectsPerStage = NA_real_, maxNumberOfSubjectsPerStage = NA_real_, conditionalPower = NA_real_, piH1 = NA_real_, piControlH1 = NA_real_, maxNumberOfIterations = 1000L, seed = NA_real_, calcSubjectsFunction = NULL, selectArmsFunction = NULL, showStatistics = TRUE )
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 3. 
effectMatrix 
Matrix of effect sizes with 
typeOfShape 
The shape of the doseresponse relationship over the treatment groups.
This can be either 
piMaxVector 
Range of assumed probabilities for the treatment group with
highest response for 
piControl 
If specified, the assumed probability in the control arm for simulation and under which the sample size recalculation is performed. 
gED50 
If 
slope 
If 
intersectionTest 
Defines the multiple test for the intersection
hypotheses in the closed system of hypotheses.
Five options are available: 
directionUpper 
Specifies the direction of the alternative,
only applicable for onesided testing; default is 
adaptations 
A vector of length 
typeOfSelection 
The way the treatment arms are selected at interim.
Five options are available: 
effectMeasure 
Criterion for treatment arm selection, either based on test statistic
( 
successCriterion 
Defines when the study is stopped for efficacy at interim.
Two options are available: 
epsilonValue 
For 
rValue 
For 
threshold 
Selection criterion: treatment arm is selected only if 
plannedSubjects 

allocationRatioPlanned 
The planned allocation ratio 
minNumberOfSubjectsPerStage 
When performing a data driven sample size recalculation,
the vector 
maxNumberOfSubjectsPerStage 
When performing a data driven sample size recalculation,
the vector 
conditionalPower 
If 
piH1 
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 
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

selectArmsFunction 
Optionally, a function can be entered that defines the way of how treatment arms
are selected. This function has to depend on 
showStatistics 
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 pi1H1
and/or piControl
makes only sense if kMax
> 1
and if conditionalPower
, minNumberOfSubjectsPerStage
, and
maxNumberOfSubjectsPerStage
(or calcSubjectsFunction
) are defined.
calcSubjectsFunction
This function returns the number of subjects at given conditional power and
conditional critical value for specified testing situation.
The function might depend on the variables
stage
,
selectedArms
,
directionUpper
,
plannedSubjects
,
allocationRatioPlanned
,
minNumberOfSubjectsPerStage
,
maxNumberOfSubjectsPerStage
,
conditionalPower
,
conditionalCriticalValue
,
overallRates
,
overallRatesControl
,
piH1
, and
piControlH1
.
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
,
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
.
# Simulate the power of the combination test with two interim stages and # O'Brien & Fleming boundaries using Dunnett's intersection tests if the # best treatment arm is selected at first interim. Selection only take # place if a nonnegative treatment effect is observed (threshold = 0); # 20 subjects per stage and treatment arm, simulation is performed for # four parameter configurations. maxNumberOfIterations < 50 designIN < getDesignInverseNormal(typeOfDesign = "OF") effectMatrix < matrix(c(0.2,0.2,0.2, 0.4,0.4,0.4, 0.4,0.5,0.5, 0.4,0.5,0.6), byrow = TRUE, nrow = 4, ncol = 3) x < getSimulationMultiArmRates(design = designIN, typeOfShape = "userDefined", effectMatrix = effectMatrix , piControl = 0.2, typeOfSelection = "best", threshold = 0, intersectionTest = "Dunnett", plannedSubjects = c(20, 40, 60), maxNumberOfIterations = maxNumberOfIterations) summary(x)