tsT {adaptTest}R Documentation

Function to implement an adaptive two-stage test

Description

There are four key quantities for the specification of an adaptive two-stage test: the overall test level α\alpha, stopping bounds α1<=α0\alpha_1 <= \alpha_0 and the local level α2\alpha_2 of the test after the second stage. These quantities are interrelated through the overall level condition. The function tsT calculates any of these quantities based on the others.

Usage

tsT(typ, a = NA, a0 = NA, a1 = NA, a2 = NA)

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

a

α\alpha, the overall test level

a0

α0\alpha_0, the futility stopping bound

a1

α1\alpha_1, the efficacy stopping bound and local level of the test after the first stage

a2

α2\alpha_2, the local level of the test after the second stage

Details

An adaptive two-stage test can be viewed as a family of decreasing functions f[c](p1)f[c](p_1) in the unit square. Each of these functions is a conditional error function, specifying the type I error conditional on the p-value p1p_1 of the first stage. For example, f[c](p1)=min(1,c/p1)f[c](p_1) = \min(1, c/p_1) corresponds to Fisher's combination test (Bauer and Koehne, 1994). Based on this function family, the test can be put into practice by specifying the desired overall level α\alpha, stopping bounds α1<=α0\alpha_1 <= \alpha_0 and a parameter α2\alpha_2. After computing p1p_1, the test stops with or without rejection of the null hypothesis if p1<=α1p_1 <= \alpha_1 or p1>α0p_1 > \alpha_0, respectively. Otherwise, the null hypothesis is rejected if and only if p2<=f[c](p1)p_2 <= f[c](p_1) holds for the p-value p2p_2 of the second stage, where cc is such that the local level of this latter test is α2\alpha_2 (e.g., c=c(α2)=exp(χ4,α22/2)c = c(\alpha_2) = \exp(-\chi^2_{4,\alpha_2}/2) for Fisher's combination test).

The four parameters α\alpha, α0\alpha_0, α1\alpha_1 and α2\alpha_2 are interdependent: they must satisfy the level condition

α1+α1α0cefα2(p1)dp1=α,\alpha_1 + \int_{\alpha_1}^{\alpha_0} cef_{\alpha_2}(p_1) d p_1 = \alpha,

where cefα2cef_{\alpha_2} is the conditional error function (of a specified family) with parameter α2\alpha_2. For example, this conditon translates to

α=α1+c(α2)(log(α0)log(α1))\alpha = \alpha_1 + c(\alpha_2) * (\log(\alpha_0) - \log(\alpha_1))

for Fisher's combination test (assuming that c(α2)<α1c(\alpha_2) < \alpha_1; Bauer and Koehne, 1994). The function tsT calculates any of the four parameters based on the remaining ones. Currently, this is implemented for the following four tests: Bauer and Koehne (1994), Lehmacher and Wassmer (1999), Vandemeulebroecke (2006), and the horizontal conditional error function.

Value

If three of the four quantities α\alpha, α0\alpha_0, α1\alpha_1 and α2\alpha_2 are provided, tsT returns the fourth. If only α\alpha and α0\alpha_0 are provided, tsT returns α1\alpha_1 under the condition α1=α2\alpha_1 = \alpha_2 (the so-called "Pocock-type").

If the choice of arguments is not allowed (e.g., α0<α1\alpha_0 < \alpha_1) or when a test cannot be constructed with this choice of arguments (e.g., α0=1\alpha_0 = 1 and α<α2\alpha < \alpha_2), tsT returns NA.

IMPORTANT: When the result is (theoretically) not unique, tsT returns the maximal α1\alpha_1, maximal α2\alpha_2 or minimal α0\alpha_0.

In all cases, tsT returns the result for the test specified by typ.

Note

The argument typ, and either exactly three of α\alpha, α0\alpha_0, α1\alpha_1 and α2\alpha_2, or only α\alpha and α0\alpha_0, must be provided to tsT.

Author(s)

Marc Vandemeulebroecke

References

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

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.

Vandemeulebroecke, M. (2008). Group sequential and adaptive designs - a review of basic concepts and points of discussion. Biometrical Journal 50, 541-557.

See Also

adaptTest package description

Examples

## Example from Bauer and Koehne (1994): full level after final stage, alpha0 = 0.5
alpha  <- 0.1
alpha2 <- 0.1
alpha0 <- 0.5
alpha1 <- tsT(typ="b", a=alpha, a0=alpha0, a2=alpha2)
plotCEF(typ="b", a2=alpha2, add=FALSE)
plotBounds(alpha1, alpha0)

## See how similar Lehmacher and Wassmer (1999) and Vandemeulebroecke (2006) are
alpha  <- 0.1
alpha1 <- 0.05
alpha0 <- 0.5
alpha2l <- tsT(typ="l", a=alpha, a0=alpha0, a1=alpha1)
alpha2v <- tsT(typ="v", a=alpha, a0=alpha0, a1=alpha1)
plotCEF(typ="l", a2=alpha2l, add=FALSE)
plotCEF(typ="v", a2=alpha2v, col="red")
plotBounds(alpha1, alpha0)

## A remark about numerics
tsT(typ="b", a=0.1, a1=0.05, a0=0.5)
tsT(typ="b", a=0.1, a2=0.104877, a0=0.5)
tsT(typ="b", a=0.1, a2=tsT(typ="b", a=0.1, a1=0.05, a0=0.5), a0=0.5)

## An example of non-uniqueness: the maximal alpha1 is returned; any
##  smaller value would also be valid
alpha  <- 0.05
alpha0 <- 1
alpha2 <- 0.05
alpha1 <- tsT(typ="b", a=alpha, a0=alpha0, a2=alpha2)
tsT(typ="b", a0=alpha0, a1=alpha1, a2=alpha2)
tsT(typ="b", a0=alpha0, a1=alpha1/2, a2=alpha2)

[Package adaptTest version 1.2 Index]