MChtest (version 1.0-3)

p1.given.p0: Find p0 (or p1) associated with p1 (or p0) that gives minimax tsprt

Description

Consider the SPRT for testing Ho:p=p0 vs H1:p=p1 where p1\(<\) Alpha \(<\) p0. For Monte Carlo tests, we want to reject and conclude that p\(<\)Alpha. In terms of the resampling risk at p (i.e., the probability of reaching a wrong decision at p) the minimax SPRT has a particular relationship between p0 and p1. Here we calculate p1 given p0 or vise versa to obtain that relationship.

Usage

p1.given.p0(p0, Alpha = 0.05, TOL = 10^-9)
p0.given.p1(p1, Alpha = 0.05, TOL = 10^-9)

Arguments

p0

null such that p0\(>\)Alpha

p1

alternative such that p1\(<\)Alpha

Alpha

want tsprt associated with testing p=Alpha or not

TOL

tolerance level input into call to uniroot

Value

either p0 or p1

References

Fay, M.P., Kim, H-J. and Hachey, M. (2007). Using truncated sequential probability ratio test boundaries for Monte Carlo implementation of hypothesis tests. Journal of Computational and Graphical Statistics. 16(4):946-967.

Examples

Run this code
# NOT RUN {
p1.given.p0(.04)
# }

Run the code above in your browser using DataLab