Learn R Programming

adaptTest (version 1.1)

pathCEF: Function to plot several conditional error functions running through a "path" of given points

Description

This function plots several conditional error functions of the same family such that each one runs through one of several given points.

Usage

pathCEF(typ = NA, fun = NA, dis = NA, p1 = 1:49/50, p2 = p1,
        x = 0:200/200, plt.pt = FALSE, plt.ptann = FALSE, xlab = NA, ylab = NA, ...)

Value

The function pathCEF is invoked for its plotting effect; it returns no meaningful value.

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

a vector (at least of length 2) of p-values \(p_1\) of the test after the first stage

p2

a vector (at least of length 2) of p-values \(p_2\) of the test after the second stage, defaults to p1; must be of same length as p1

x

vector on which the conditional error functions are plotted (should be relatively dense in [0,1])

plt.pt

logical determining whether the points that the conditional error functions are made to run through should be plotted or not (default: not)

plt.ptann

logical determining whether the points that the conditional error functions are made to run through should be annotated or not (default: not)

xlab

a label for the x axis (default: no label)

ylab

a label for the y axis (default: no label)

...

arguments to be passed on to the underlying plot and points functions (e.g., graphical parameters)

Author

Marc Vandemeulebroecke

Details

It can be instructive to plot not only one conditional error function, but to visualize a whole family. This can easily be done with pathCEF. The function is used in a similar way as plotCEF, but p1 and p2 are now vectors (of the same length, at least of length 2). Conditional error functions are plotted that run through the specified elementwise points (p1,p2) (which by default lie on the main diagonal).

Internally, pathCEF uses plotCEF to plot the individual conditional error functions; see this latter function for further details.

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.

See Also

adaptTest package description, CEF, plotCEF, tsT

Examples

Run this code
## Compare the tests by Bauer and Koehne (1994),
##  Lehmacher and Wassmer (1999) and Vandemeulebroecke (2006)
oldmfcol <- par(mfcol=c(1,3))
pathCEF(typ="b", main="BK 94")
pathCEF(typ="l", main="LW 99")
pathCEF(typ="v", main="V 06")
par(oldmfcol)

Run the code above in your browser using DataLab