Learn R Programming

stoppingrule (version 0.6)

plot.rule.surv: Plot Stopping Rule (Survival Data)

Description

Display a stopping rule graphically as a curve for time-to-event data

Usage

# S3 method for rule.surv
plot(
  x,
  xlim = c(0, max(x$Rule[, 1])),
  ylim = c(0, max(x$Rule[, 2]) + 1),
  xlab = "Total Exposure Time",
  ylab = "# Events",
  ...
)

Value

No return value; function solely generates a plot

Arguments

x

A rule.surv object calculated by calc.rule.surv() 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 parameters passed to the plot function.

Examples

Run this code
if (FALSE) poc_rule = calc.rule.surv(n=50,p0=0.20,alpha=0.10,type="Pocock",tau=100)
gp_rule = calc.rule.surv(n=50,p0=0.20,alpha=0.10,type="GP",tau=100,param=c(1,1000))
plot(poc_rule)
lines(gp_rule,col="red")

Run the code above in your browser using DataLab