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 , stopping bounds
and the local level
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: |
a |
|
a0 |
|
a1 |
|
a2 |
|
Details
An adaptive two-stage test can be viewed as a family of decreasing functions in the unit square. Each of these functions is a conditional error function, specifying the type I error conditional on the p-value
of the first stage. For example,
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
, stopping bounds
and a parameter
. After computing
, the test stops with or without rejection of the null hypothesis if
or
, respectively. Otherwise, the null hypothesis is rejected if and only if
holds for the p-value
of the second stage, where
is such that the local level of this latter test is
(e.g.,
for Fisher's combination test).
The four parameters ,
,
and
are interdependent: they must satisfy the level condition
where is the conditional error function (of a specified family) with parameter
. For example, this conditon translates to
for Fisher's combination test (assuming that ; 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 ,
,
and
are provided,
tsT
returns the fourth. If only and
are provided,
tsT
returns under the condition
(the so-called "Pocock-type").
If the choice of arguments is not allowed (e.g., ) or when a test cannot be constructed with this choice of arguments (e.g.,
and
),
tsT
returns NA
.
IMPORTANT: When the result is (theoretically) not unique, tsT
returns the maximal , maximal
or minimal
.
In all cases, tsT
returns the result for the test specified by typ
.
Note
The argument typ
, and either exactly three of ,
,
and
, or only
and
, 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)