Description Usage Arguments Details Value Note Author(s) References See Also Examples
This function computes and plots overall pvalues for adaptive twostage tests.
1 2 3 
typ 
type of test: 
fun 
a conditional error function 
dis 
a distortion method for a supplied conditional error function (see details): 
p1 
the pvalue p1 of the test after the first stage, or a vector of such pvalues 
p2 
the pvalue p2 of the test after the second stage, or a vector of such pvalues; defaults to 
a1 
alpha1, the efficacy stopping bound and local level of the test after the first stage (default: no stopping for efficacy) 
a0 
alpha0, the futility stopping bound (default: no stopping for futility) 
grid 
logical determining whether a grid should be spanned by 
plt 
logical determining whether the overall pvalues should be plotted or not (default: not) 
invisible 
logical determining whether the printing of the overall pvalues should be suppressed or not (default: not) 
wire 
logical determining whether the overall pvalues should be plotted in wireframestyle or in cloudstyle (default: cloudstyle) 
round 
rounding specification, logical or integer (see details; default: no rounding) 
The overall pvalue for an adaptive twostage test is computed as p1 if p1 <= alpha1 or p1 > alpha0, and as
alpha1 + int_{alpha1}^{alpha0} cef_{(p1,p2)}(x) d x
otherwise, where cef_{(p1,p2)} is the conditional error function (of a specified family) running through the observed pair of pvalues (p1,p2)
.
There are two alternative ways of specifying the family of conditional error functions (i.e., the test): through a type typ
, or through an initial conditional error function fun
and a distortion method dis
; see CEF
for details.
If p1 and p2 are of length 1, a single overall pvalue is computed (and not plotted). Otherwise, the behavior of ovP
depends on grid
:
If grid = FALSE
, overall pvalues are computed (and not plotted) for the elementwise pairs of p1
and p2
. Here, p1
and p2
must be of the same length.
If grid = TRUE
, a grid is spanned by p1
and p2
, and pvalues are computed (and possibly plotted) over this grid. Here, p1
and p2
may be of different length. Plotting is triggered by plt = TRUE
, and the style of the plot (wireframe or cloud) is determined by wire
. invisible = TRUE
suppresses the printing of the pvalues.
The pvalues are rounded to round
digits after the comma (round = TRUE
rounds to 1 digit; round = FALSE
and round = 0
prevent rounding). The plot always shows unrounded values.
A pvalue, a vector of pvalues or a matrix of pvalues.
Provide either typ
or fun
, not both! If fun
is provided, then also specify dis
.
Marc Vandemeulebroecke
Bauer, P., Koehne, K. (1994). Evaluation of experiments with adaptive interim analyses. Biometrics 50, 10291041.
Brannath, W., Posch, M., Bauer, P. (2002). Recursive combination tests. J. Amer. Statist. Assoc. 97, 236244.
Lehmacher, W., Wassmer, G. (1999). Adaptive sample size calculations in group sequential trials. Biometrics 55, 12861290.
Vandemeulebroecke, M. (2006). An investigation of twostage tests. Statistica Sinica 16, 933951.
adaptTest
package description, CEF
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  ## Visualize a Lehmacher Wassmer (1999) test to the overall level 0.1
## and compute and visualize the overall pvalue for an observed (p1,p2)=(0.3,0.7)
alpha < .1
alpha0 < .5
alpha1 < .05
plotBounds(a1=alpha1, a0=alpha0, add=FALSE)
plotCEF(typ="l", a2=tsT(typ="l", a=alpha, a0=alpha0, a1=alpha1))
plotCEF(typ="l", p1=.3, p2=.7)
ovP(typ="l", p1=.3, p2=.7, a1=alpha1, a0=alpha0)
# The overall pvalue is the area left of alpha1, plus the area below the
# conditional error function running though (0.3,0.7) between alpha1 and alpha0.
## Investigate the pvalues of the Lehmacher Wassmer (1999) test from above
ovP(typ="l", a1=alpha1, a0=alpha0, grid=TRUE, p1=1:9/10, round=3)
ovP(typ="l", a1=alpha1, a0=alpha0, grid=TRUE, plt=TRUE, invisible=TRUE, wire=TRUE)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.