Learn R Programming

gsearly (version 1.0.0)

plot.gsearly: Plot a gsearly model

Description

Plots data from a gsearly model constructed using either gsearlyModel or gsearlyUser.

Usage

# S3 method for gsearly
plot(x, plottype=1, ...)

Value

A plot of the selected type.

Arguments

x

A gsearly model from function either gsearlyModel or gsearlyUser.

plottype

A value which is one of either 1 or "recruit", 2 or "inform", 3 or "plotBoundary" and 4 or "plotPower".

...

Further graphical parameters for lines and points.

Examples

Run this code

 # For 90 percent power (pow), a call to gsearlyModel provides a feasible design
 fp <- c(0.0000,0.0010,0.0250)
 tn <- c(0.4800,0.7200,0.9750)
 rctdesign <- gsearlyModel(rmodel="dilin", trecruit=36, s=3, tfu=c(3,6,12),
                   tinterims=c(16,31), pow=0.8,
                   cmodel="exponential", sd=20, rho=0.75, theta=8, fp=fp, tn=tn)
 plot(rctdesign, "recruit")

Run the code above in your browser using DataLab