Skip to contents

This function will plot the response rate on the futility and efficacy boundaries, and is used together with boundsPredprob and boundsPostprob

Usage

plotBounds(
  z,
  area = TRUE,
  grid = TRUE,
  yt = "x",
  add = FALSE,
  cols = c("green", "red", "darkgreen", "orange"),
  lwds = c(3, 3),
  ltype = "l",
  lpch = 16,
  lcex = 1,
  gy = 20
)

Arguments

z

an output of boundsPredprob and boundsPostprob

area

color the futility/efficacy stop area

grid

show the grid of y-axis or not

yt

indicate the y axis: response rate is "p", number of responses is "x"

add

add the boundary lines or not

cols

specific the color of [1] efficacy area [2] futility area [3] efficacy boundary [4] futility boundary

lwds

line width (a two dimensional vector)

ltype

line type

lpch

a value of plotting characters or symbols

lcex

a value giving the amount by which plotting characters and symbols should be scaled relative to the default.

gy

a value to adjust the gray level of the plot (default 20), applies when grid==TRUE

Value

nothing, only produces the plot as side effect

Examples

# examples
plotBounds(boundsPredprob(
  nvec = c(10, 20, 30, 40), p = 0.20, tT = 0.80,
  phiL = 0.10, phiU = 0.90, a = 1, b = 1
), yt = "x")

plotBounds(boundsPredprob(
  nvec = c(10, 20, 30, 40), p = 0.20, tT = 0.80,
  phiL = 0.10, phiU = 0.90, a = 1, b = 1
), yt = "p")
plotBounds(
  boundsPostprob(
    nvec = c(10, 20, 30, 40), p0 = 0.20,
    tL = 0.10, tU = 0.90, a = 1, b = 1
  ),
  yt = "p", add = TRUE
)