Learn R Programming

stoppingrule (version 0.6)

plot.rule.tite: Plot Stopping Rule (TITE Method)

Description

Display a stopping rule graphically as a curve

Usage

# S3 method for rule.tite
plot(
  x,
  xlim = c(0, x$n),
  ylim = c(0, max(x$Rule[, 2]) + 1),
  xlab = " Effective Sample Size",
  ylab = "# Events",
  ...
)

Value

No return value; function solely generates a plot

Arguments

x

A rule.tite object calculated by calc.rule.tite() function

xlim

The x limits (x1, x2) of the plot. Note that x1 > x2 is allowed and leads to a ‘reversed axis’.

ylim

The y limits of the plot.

xlab

The title for the x axis

ylab

The title for the y axis

...

Other options to be passed to generic plot function

Examples

Run this code
if (FALSE) # Binomial Pocock test in 50 patient cohort at 10% level, expected toxicity probability of 20%
poc_rule = calc.rule.tite(n=50,p0=0.20,alpha=0.10,type="Pocock")

# Bayesian beta-extended binomial method in 50 patient cohort at 10% level,
# expected toxicity probability of 20%
bb_rule = calc.rule.tite(n=50,p0=0.20,alpha=0.10,type="BB",param=c(2,8))

# Plot stopping boundary
plot(poc_rule,col="blue")
lines(bb_rule,col="red")

Run the code above in your browser using DataLab