Learn R Programming

adaptTest (version 1.1)

getpar: Function to calculate the parameter that specifies the conditional error function running through a given point

Description

This function calculates the parameter that specifies the conditional error function running through a given point \((p_1,p_2)\), based on a chosen family of conditional error functions.

Usage

getpar(typ, p1 = NA, p2 = p1, c = FALSE)

Value

getpar returns the parameter (either \(\alpha_2\) or \(c\), depending on the chosen parameterization) that specifies the conditional error function running through \((p_1,p_2)\).

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

p1

the p-value \(p_1\) of the test after the first stage

p2

the p-value \(p_2\) of the test after the second stage, defaults to p1

c

logical determining whether the parameter \(\alpha_2\) or the parameter \(c\) is returned (\(\alpha_2\) is the default).

Author

Marc Vandemeulebroecke

Details

See parconv for more information on the two alternative parameterizations by \(\alpha_2\) and \(c\).

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, parconv, CEF

Examples

Run this code
## Plot the conditional error function of the Lehmacher-Wassmer (1999)
##  type that runs through (p1,p2)=(0.3,0.7)
alpha2 <- getpar(typ="l", p1=0.3, p2=0.7)
plotCEF(typ="l", a2=alpha2, add=FALSE)

## Other ways of doing the same as above
plotCEF(typ="l", p1=0.3, p2=0.7, add=FALSE)
plot(CEF(typ="l", p1=0.3, p2=0.7), xlim=0:1)

Run the code above in your browser using DataLab