waldBoundary: Wald Boundaries In SPRT: Wald's Sequential Probability Ratio Test

Description

Calculate Wald's A and B boundaries, such that A and B satisfy 0 < B < A < Inf. Note that the function returns the natural logarithm of the boundaries by default.

Usage

 1 waldBoundary(type1 = 0.05, type2 = 0.2, boundary = NULL, log = TRUE)

Arguments

 type1 type I error rate. type2 type II error rate. boundary an optional character string specifying the boundary. Must be one of "A" or "B". log a logical variable indicating whether to return the boundary's natural logarithm.

Value

A numeric vector of length 1 if boundary is set to either "A" or "B", or a numeric vector of length 2 if boundary is set to NULL.

Author(s)

Stephane Mikael Bottine

References

Ghosh, B.K. and Sen, P.K. (1991). Handbook of Sequential Analysis, Marcel Dekker, New York. Wald, A. (1947). Sequential Analysis, Dover, New York.

Examples

 1 2 3 4 5 6 7 8 9 10 11 ## Return the logarithm of Wald's A and B boundaries waldBoundary() # Return Wald's A and B boundaries waldBoundary(log = FALSE) # Return only Wald's A boundary waldBoundary(boundary = "A", log = FALSE) ## Boundary for different type I and II error rates waldBoundary(type1 = 0.01, type2 = 0.01, boundary = "A", log = FALSE)

Example output

A         B
2.772589 -1.558145
A          B
16.0000000  0.2105263
 16
 99

SPRT documentation built on May 2, 2019, 6:35 a.m.