getConditionalPower {rpact}R Documentation

Get Conditional Power


Calculates and returns the conditional power.


getConditionalPower(stageResults, ..., nPlanned, allocationRatioPlanned = 1)



The results at given stage, obtained from getStageResults().


Further (optional) arguments to be passed:

thetaH1 and assumedStDevs, pi1, pi2, or piTreatments, piControl(s)

The assumed effect size, standard deviation or rates to calculate the conditional power if nPlanned is specified. For survival designs, thetaH1 refers to the hazard ratio. For one-armed trials with binary outcome, only pi1 can be specified, for two-armed trials with binary outcome, pi1 and pi2 can be specified referring to the assumed treatment and control rate, respectively. In multi-armed or enrichment designs, you can specify a value or a vector with elements referring to the treatment arms or the sub-populations, respectively. For testing rates, the parameters to be specified are piTreatments and piControl (multi-arm designs) and piTreatments and piControls (enrichment designs).
If not specified, the conditional power is calculated under the assumption of observed effect sizes, standard deviations, rates, or hazard ratios.


Iterations for simulating the power for Fisher's combination test. If the power for more than one remaining stages is to be determined for Fisher's combination test, it is estimated via simulation with specified
iterations, the default is 1000.


Seed for simulating the conditional power for Fisher's combination test. See above, default is a random seed.


The additional (i.e., "new" and not cumulative) sample size planned for each of the subsequent stages. The argument must be a vector with length equal to the number of remaining stages and contain the combined sample size from both treatment groups if two groups are considered. For survival outcomes, it should contain the planned number of additional events. For multi-arm designs, it is the per-comparison (combined) sample size. For enrichment designs, it is the (combined) sample size for the considered sub-population.


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. In this case, a change of allocating subjects to treatment groups over the stages can be assessed.


The conditional power is calculated if the planned sample size for the subsequent stages is specified.
For testing rates in a two-armed trial, pi1 and pi2 typically refer to the rates in the treatment and the control group, respectively. This is not mandatory, however, and so pi1 and pi2 can be interchanged. In many-to-one multi-armed trials, piTreatments and piControl refer to the rates in the treatment arms and the one control arm, and so they cannot be interchanged. piTreatments and piControls in enrichment designs can principally be interchanged, but we use the plural form to indicate that the rates can be differently specified for the sub-populations.

For Fisher's combination test, the conditional power for more than one remaining stages is estimated via simulation.


Returns a ConditionalPowerResults object. The following generics (R generic functions) are available for this result object:

How to get help for generic functions

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.

See Also

plot.StageResults() or plot.AnalysisResults() for plotting the conditional power.

Other analysis functions: getClosedCombinationTestResults(), getClosedConditionalDunnettTestResults(), getConditionalRejectionProbabilities(), getFinalConfidenceInterval(), getFinalPValue(), getRepeatedConfidenceIntervals(), getRepeatedPValues(), getStageResults(), getTestActions()


## Not run: 
data <- getDataset(
   n1     = c(22, 13, 22, 13),
   n2     = c(22, 11, 22, 11),  
   means1 = c(1, 1.1, 1, 1),
   means2 = c(1.4, 1.5, 1, 2.5), 
   stds1  = c(1, 2, 2, 1.3),
   stds2  = c(1, 2, 2, 1.3))
stageResults <- getStageResults(
   getDesignGroupSequential(kMax = 4), 
   dataInput = data, stage = 2, directionUpper = FALSE) 
getConditionalPower(stageResults, thetaH1 = -0.4, 
   nPlanned = c(64, 64), assumedStDev = 1.5, allocationRatioPlanned = 3)
## End(Not run)

[Package rpact version 3.3.4 Index]