gsProbability | R Documentation |
Computes power/Type I error and expected sample size for a group sequential
design across a selected set of parameter values for a given set of analyses
and boundaries. The print function has been extended using
print.gsProbability
to print gsProbability
objects; see
examples.
Depending on the calling sequence, an object of class gsProbability
or class gsDesign
is returned. If it is of class gsDesign
then
the members of the object will be the same as described in
gsDesign
. If d
is input as NULL
(the default),
all other arguments (other than r
) must be specified and an object of
class gsProbability
is returned. If d
is passed as an object
of class gsProbability
or gsDesign
the only other argument
required is theta
; the object returned has the same class as the
input d
. On output, the values of theta
input to
gsProbability
will be the parameter values for which the design is
characterized.
gsProbability(k = 0, theta, n.I, a, b, r = 18, d = NULL, overrun = 0)
## S3 method for class 'gsProbability'
print(x, ...)
k |
Number of analyses planned, including interim and final. |
theta |
Vector of standardized effect sizes for which boundary crossing probabilities are to be computed. |
n.I |
Sample size or relative sample size at analyses; vector of length
k. See |
a |
Lower bound cutoffs (z-values) for futility or harm at each analysis, vector of length k. |
b |
Upper bound cutoffs (z-values) for futility at each analysis; vector of length k. |
r |
Control for grid as in Jennison and Turnbull (2000); default is 18, range is 1 to 80. Normally this will not be changed by the user. |
d |
If not |
overrun |
Scalar or vector of length |
x |
An item of class |
... |
Not implemented (here for compatibility with generic print input). |
k |
As input. |
theta |
As input. |
n.I |
As input. |
lower |
A list containing two elements: |
upper |
A list of the same form as
|
en |
A vector of the same length as |
r |
As input. |
Note:
print.gsProbability()
returns the input x
.
The gsDesign technical manual is available at https://keaven.github.io/gsd-tech-manual/.
Keaven Anderson keaven_anderson@merck.com
Jennison C and Turnbull BW (2000), Group Sequential Methods with Applications to Clinical Trials. Boca Raton: Chapman and Hall.
plot.gsDesign, gsDesign
,
vignette("gsDesignPackageOverview")
library(ggplot2)
# making a gsDesign object first may be easiest...
x <- gsDesign()
# take a look at it
x
# default plot for gsDesign object shows boundaries
plot(x)
# \code{plottype=2} shows boundary crossing probabilities
plot(x, plottype = 2)
# now add boundary crossing probabilities and
# expected sample size for more theta values
y <- gsProbability(d = x, theta = x$delta * seq(0, 2, .25))
class(y)
# note that "y" below is equivalent to \code{print(y)} and
# \code{print.gsProbability(y)}
y
# the plot does not change from before since this is a
# gsDesign object; note that theta/delta is on x axis
plot(y, plottype = 2)
# now let's see what happens with a gsProbability object
z <- gsProbability(
k = 3, a = x$lower$bound, b = x$upper$bound,
n.I = x$n.I, theta = x$delta * seq(0, 2, .25)
)
# with the above form, the results is a gsProbability object
class(z)
z
# default plottype is now 2
# this is the same range for theta, but plot now has theta on x axis
plot(z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.