rpact: Confirmatory Adaptive Clinical Trial Design and Analysis


plot.TrialDesignSet {rpact}R Documentation

Trial Design Set Plotting

Description

Plots a trial design set.

Usage

## S3 method for class 'TrialDesignSet'
plot(x, y, type = 1L, main = NA_character_,
  xlab = NA_character_, ylab = NA_character_, palette = "Set1",
  theta = seq(-1, 1, 0.02), nMax = NA_integer_,
  plotPointsEnabled = NA, legendPosition = NA_integer_,
  showSource = FALSE, ...)

Arguments


x

The trial design set, obtained from getDesignSet.

y

Not available for this kind of plot (is only defined to be compatible to the generic plot function).

type

The plot type (default = 1). The following plot types are available:

  • 1: creates a 'Boundaries' plot

  • 3: creates a 'Stage Levels' plot

  • 4: creates a 'Type One Error Spending' plot

  • 5: creates a 'Power and Early Stopping' plot

  • 6: creates an 'Average Sample Size and Power / Early Stop' plot

  • 7: creates an 'Power' plot

  • 8: creates an 'Early Stopping' plot

  • 9: creates an 'Average Sample Size' plot

main

The main title.

xlab

The x-axis label.

ylab

The y-axis label.

palette

The palette, default is "Set1".

theta

A vector of theta values.

nMax

The maximum sample size.

plotPointsEnabled

If TRUE, additional points will be plotted.

legendPosition

The position of the legend. By default (NA_integer_) the algorithm tries to find a suitable position. Choose one of the following values to specify the position manually:

  • -1: no legend will be shown

  • NA: the algorithm tries to find a suitable position

  • 0: legend position outside plot

  • 1: legend position left top

  • 2: legend position left center

  • 3: legend position left bottom

  • 4: legend position right top

  • 5: legend position right center

  • 6: legend position right bottom

showSource

If TRUE, the parameter names of the object will be printed which were used to create the plot; that may be, e.g., useful to check the values or to create own plots with plot.

...

Optional ggplot2 arguments.

Details

Generic function to plot a trial design set. Is, e.g., useful to compare different designs or design parameters visual.

Value

Returns a ggplot2 object.

Examples


design <- getDesignInverseNormal(kMax = 3, alpha = 0.025, 
    typeOfDesign = "asKD", gammaA = 2, 
    informationRates = c(0.2, 0.7, 1), typeBetaSpending = "bsOF")
 
# Create a set of designs based on the master design defined above 
# and varied parameter 'gammaA'
designSet <- getDesignSet(design = design, gammaA = 4)
  
if (require(ggplot2)) plot(designSet, type = 1, legendPosition = 6)


[Package rpact version 2.0.5 Index | www.rpact.org]