Learn R Programming

gsearly (version 1.0.0)

plotBoundary: A boundary plot for a gsearly model

Description

A boundary plot for a gsearly model.

Usage

plotBoundary(mod, xlim=c(0,1), ylim=NA, xlab=NA, ylab=NA, title=NULL, col=1,
    lty=c(3, 3), pch=3, las=1, concol=grey(0.9), reglab=TRUE,  signif=3,
    bounds=TRUE, pcol=1, labpos=c(2,2), ...)

Value

A plot of the selected type or a list consisting of interim information fractions and lower and upper boundaries.

Arguments

mod

A gsearly model from function gsearlyModel or gsearlyUser functions.

xlim

The x limits c(x1, x2) of the plot; default NA.

ylim

The y limits of the plot; default NA.

xlab

A label for the x axis; defaults to "Information".

ylab

A label for the y axis; defaults to "Normal Critical Values".

title

A main title for the plot; default NULL.

col

Default plotting color for lines and points; default 1.

lty

A vector of line types for upper and lower boundaries; default c(2, 2).

pch

Plotting character or symbol for points; default 3.

las

A numeric value which is one of either 0, 1, 2 or 3; the style of axis labels, 0: always parallel to the axis, 1: always horizontal (default), 2: always perpendicular to the axis, 3: always vertical.

concol

Color for the continue region, default grey(0.9). Set to grey(1) for no color.

reglab

Logical for plotting of region (Continue, Reject H0 and Accept H0) labels; default TRUE.

signif

Number of decimal places for the boundaries; default 3.

bounds

Logical for plotting boundary values; default TRUE.

pcol

Color for region labels and points; default 1.

labpos

Position for upper and lower boundary values (if bounds=TRUE); default c(2, 2).

...

Further arguments to plot function.

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="fix", 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)
 plotBoundary(rctdesign)

Run the code above in your browser using DataLab