Learn R Programming

PIPS (version 1.0.1)

plot.pred.int: Plot objects of class pred.int for predicted interval plots

Description

Plot objects of class pred.int for predicted interval plots

Usage

"plot"(x, conf.int = TRUE, vline = NA, which = NULL, axes = TRUE, pi.col.fun=NULL, ci.col=2, main, xlab, ylab, xlim, ...)

Arguments

x
Object of class pred.int containing the PIPs data for plotting
conf.int
Print confidence interval for observed data? TRUE (default)/FALSE
vline
Vector of x-values for vertical lines to print on the graph. These may represent superiority/inferiority bounds or other x-values of interest
which
Only create graphs for some of the comparisons
axes
TRUE/FALSE. Print axes on graph? Default is TRUE. Probably you should only suppress axes now if you will add them later (for example if you don't like the default axes)
pi.col.fun
An optional one parameter function that takes a number between 0 and 100 and returns a color. This can be used to color the predicted intervals different colors. The input argument is the position of the interval on the vertical axis of the graph. Default coloring is three shades of gray: Percentiles (0-10) and (90-100) are light gray, (10-25) and (75-90) are darker, and (25-75) is darkest
ci.col
Color for effect estimate and confidence interval for the observed data. Default is 2 (second color in palette).
main
Main title of graph. If blank, a default will be used. Can be either a single title or a vector of titles. If a vector, the first will be used for the first graph, the second for the second graph, etc... If any title contains the string "#BY#", this will be replaced with the name of the comparison (i.e. "B vs A")
xlab
Label on xaxis. If blank, a default will be used.
ylab
Label on xaxis. If blank, a default will be used.
xlim
Limits of xaxis (as vector of length 2). Default is large enough to contain the predicted intervals and confidence interval. Limits narrower than the defaults will be ignored.
...
Other options will be passed through to the plot.default function.

Value

No return value. Called for its side effect.

References

Evans SR, Li L, Wei LJ, "Data Monitoring in Clinical Trials Using Prediction", Drug Information Journal, 41:733-742, 2007.

Li L, Evans SR, Uno H, Wei LJ. "Predicted Interval Plots: A Graphical Tool for Data Monitoring in Clinical Trials", Statistics in Biopharmaceutical Research, 1:4:348-355, 2009.

See Also

PIPS

pred.int

print.pred.int

Examples

Run this code
# Make some fake data
myY<-c(rep(1,times=20),rep(0,times=80),rep(1,times=25),rep(0,times=25))
myGroup<-c(rep('A',100),rep('B',50))

# Run the programs
pips <- pred.int(y=myY, group=myGroup, N=c(200,100), 
                 data.type="binary", iters=100)
print(pips)
plot(pips)

# Run demo(package="PIPS") for more examples.

Run the code above in your browser using DataLab