View source: R/plot_functions.R
| plotPower | R Documentation |
A power plot for a gsearly model.
plotPower(mod, xlim=NA, ylim=NA, xlab=NA, ylab=NA, title=NULL,
col=c(1,2), lty=NA, pch=3, las=1, legpos=c("bottomright","topright"),
xtype="theta", delta=seq(0,1,0.05), legstudy=NA, ...)
mod |
A gsearly model from function |
xlim |
The |
ylim |
The |
xlab |
A label for the x axis; default depends on |
ylab |
A label for the |
title |
A main title for the plot; default |
col |
Plotting colours for the lower and upper boundaries; default
|
lty |
Line types, which should be a numeric vector of length equal to the
number of looks ( |
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. |
legpos |
Legend position is a vector of length 2 giving the positions of
the legends (interims and probabilities), which are one of
|
xtype |
X-axis options are either |
delta |
An ordered vector of values at which the probabilities are
calculated. Smoother curves are obtained if the intervals between values are
smaller; default |
legstudy |
A label for the study name in the legend; default is
|
... |
Further arguments to plot function. |
A plot of the selected type or a list consisting of the plotted line and interim point data.
# For 90 percent power (pow), a call to gsearlyModel provides a feasible design
fp <- c(0.0010,0.0100,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)
plotPower(rctdesign)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.