ovP {adaptTest}R Documentation

Function to compute and visualize overall p-values

Description

This function computes and plots overall p-values for adaptive two-stage tests.

Usage

ovP(typ = NA, fun = NA, dis = NA, p1 = 1:49/50, p2 = p1,
    a1 = 0, a0 = 1, grid = FALSE, plt = FALSE,
    invisible = FALSE, wire = FALSE, round = FALSE)

Arguments

typ

type of test: "b" for Bauer and Koehne (1994), "l" for Lehmacher and Wassmer (1999), "v" for Vandemeulebroecke (2006) and "h" for the horizontal conditional error function

fun

a conditional error function

dis

a distortion method for a supplied conditional error function (see details): "pl" for power lines, "vt" for vertical translation

p1

the p-value p_1 of the test after the first stage, or a vector of such p-values

p2

the p-value p_2 of the test after the second stage, or a vector of such p-values; defaults to p1

a1

\alpha_1, the efficacy stopping bound and local level of the test after the first stage (default: no stopping for efficacy)

a0

\alpha_0, the futility stopping bound (default: no stopping for futility)

grid

logical determining whether a grid should be spanned by p1 and p2 (default: no grid is spanned)

plt

logical determining whether the overall p-values should be plotted or not (default: not)

invisible

logical determining whether the printing of the overall p-values should be suppressed or not (default: not)

wire

logical determining whether the overall p-values should be plotted in wireframe-style or in cloud-style (default: cloud-style)

round

rounding specification, logical or integer (see details; default: no rounding)

Details

The overall p-value for an adaptive two-stage test is computed as p_1 if p_1 <= \alpha_1 or p_1 > \alpha_0, and as

\alpha_1 + \int_{\alpha_1}^{\alpha_0} cef_{(p_1,p_2)}(x) d x

otherwise, where cef_{(p_1,p_2)} is the conditional error function (of a specified family) running through the observed pair of p-values (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 p-value is computed (and not plotted). Otherwise, the behavior of ovP depends on grid:

The p-values 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.

Value

A p-value, a vector of p-values or a matrix of p-values.

Note

Provide either typ or fun, not both! If fun is provided, then also specify dis.

Author(s)

Marc Vandemeulebroecke

References

Bauer, P., Koehne, K. (1994). Evaluation of experiments with adaptive interim analyses. Biometrics 50, 1029-1041.

Brannath, W., Posch, M., Bauer, P. (2002). Recursive combination tests. J. Amer. Statist. Assoc. 97, 236-244.

Lehmacher, W., Wassmer, G. (1999). Adaptive sample size calculations in group sequential trials. Biometrics 55, 1286-1290.

Vandemeulebroecke, M. (2006). An investigation of two-stage tests. Statistica Sinica 16, 933-951.

See Also

adaptTest package description, CEF

Examples

## Visualize a Lehmacher Wassmer (1999) test to the overall level 0.1
## and compute and visualize the overall p-value 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 p-value 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 p-values 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)

[Package adaptTest version 1.2 Index]