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, stage = x$getNumberOfStages(), allocationRatioPlanned = C_ALLOCATION_RATIO_DEFAULT, main = NA_character_, xlab = NA_character_, ylab = NA_character_, legendTitle = NA_character_, palette = "Set1", legendPosition = NA_integer_, showSource = FALSE)
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

type 
The plot type (default = 1). Note that at the moment only one type (the conditional power plot) is available. 
nPlanned 
The sample size planned for the subsequent stages. It should be a vector with length equal to the remaining stages and is the overall sample size in the two treatment groups if two groups are considered. 
stage 
The stage number (optional). Default: total number of existing stages in the data input used to create the stage results. 
allocationRatioPlanned 
The allocation ratio for two treatment groups planned for the subsequent stages, the default value is 1. 
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 
If 
Generic function to plot all kinds of stage results. The conditional power is calculated only if effect size and sample size is specified.
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))