The intent is that many standard plot()
parameters will function as expected; exceptions to this rule exist.
In particular, main, xlab, ylab, lty, col, lwd, type, pch, cex
have been tested and work for most values of plottype
; one
exception is that type="l"
cannot be overridden when plottype=2
. Default values for labels depend on plottype
and
the class of x
.
Note that there is some special behavior for values plotted and returned
for power and expected sample size (ASN) plots for a gsDesign
object.
A call to x<-gsDesign()
produces power and expected sample size for only two theta
values: 0 and x$delta
.
The call plot(x, plottype="Power")
(or plot(x,plottype="ASN"
) for a gsDesign
object produces power (expected sample size) curves and returns a gsDesign
object with theta
values determined as follows.
If theta
is non-null on input, the input value(s) are used.
Otherwise, for a gsProbability
object, the theta
values from that object are used.
For a gsDesign
object where theta
is input as NULL
(the default), theta=seq(0,2,.05)*x$delta
) is used.
For a gsDesign
object, the x-axis values are rescaled to theta/x$delta
and the label for the x-axis \(theta / delta\).
For a gsProbability
object, the values of theta
are plotted and are labeled as \(theta\).
See examples below.
Estimated treatment effects at boundaries are computed dividing the Z-values at the boundaries by the square root of n.I
at that analysis.
Spending functions are plotted for a continuous set of values from 0 to 1.
This option should not be used if a boundary is used or a pointwise spending function is used
(sfu
or sfl="WT", "OF", "Pocock"
or sfPoints
).
Conditional power is computed using the function gsBoundCP()
.
The default input for this routine is theta="thetahat"
which will compute the conditional power at each bound using the estimated treatment effect at that bound.
Otherwise, if the input is gsDesign
object conditional power is computed assuming theta=x$delta
, the original effect size for which the trial was planned.
Average sample number/expected sample size is computed using n.I
at each analysis times the probability of crossing a boundary at that analysis.
If no boundary is crossed at any analysis, this is counted as stopping at the final analysis.
B-values are Z-values multiplied by sqrt(t)=sqrt(x$n.I/x$n.I[x$k])
.
Thus, the expected value of a B-value at an analysis is the true value of
\(theta\) multiplied by the proportion of total planned observations at that time.
See Proschan, Lan and Wittes (2006).