plot.StageResults {rpact}  R Documentation 
Plots the conditional power together with the likelihood function.
## S3 method for class 'StageResults'
plot(
x,
y,
...,
type = 1L,
nPlanned,
allocationRatioPlanned = 1,
main = NA_character_,
xlab = NA_character_,
ylab = NA_character_,
legendTitle = NA_character_,
palette = "Set1",
legendPosition = NA_integer_,
showSource = FALSE,
plotSettings = NULL
)
x 
The stage results at given stage, obtained from 
y 
Not available for this kind of plot (is only defined to be compatible to the generic plot function). 
... 
Optional plot arguments. Furthermore the following arguments can be defined:

type 
The plot type (default = 1). Note that at the moment only one type (the conditional power plot) is available. 
nPlanned 
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 multiarm designs, it is the percomparison (combined) sample size. For enrichment designs, it is the (combined) sample size for the considered subpopulation. 
allocationRatioPlanned 
The planned allocation ratio 
main 
The main title. 
xlab 
The xaxis label. 
ylab 
The yaxis label. 
legendTitle 
The legend title. 
palette 
The palette, default is 
legendPosition 
The position of the legend.
By default (

showSource 
Logical. If
Note: no plot object will be returned if 
plotSettings 
An object of class 
Generic function to plot all kinds of stage results. The conditional power is calculated only if effect size and sample size is specified.
Returns a ggplot2
object.
design < getDesignGroupSequential(
kMax = 4, alpha = 0.025,
informationRates = c(0.2, 0.5, 0.8, 1),
typeOfDesign = "WT", deltaWT = 0.25
)
dataExample < getDataset(
n = c(20, 30, 30),
means = c(50, 51, 55),
stDevs = c(130, 140, 120)
)
stageResults < getStageResults(design, dataExample, thetaH0 = 20)
if (require(ggplot2)) plot(stageResults, nPlanned = c(30), thetaRange = c(0, 100))