Learn R Programming

MSPRT (version 2.1)

objfunc.oneProp: Objective function for determining the UMPBT point alternative in one-sample proportion tests

Description

This is the \(h(p, \delta)\) function as in the supplemental file. Given a \(\delta\), we optimize this function to get the UMPBT(\(\delta\)) alternative for one-sample proportion tests in a fixed design.

Usage

objfunc.oneProp(p, delta, n, p0)

Arguments

p

a numeric in (0,1); the value of proportion.

delta

a positive numeric; corresponding to this \(\delta\), the UMPBT(\(\delta\)) alternative is obtained.

n

a positive numeric (integer); number of samples to be used.

p0

a numeric in (0,1); the hypothesized value of proportion under the simple null.

Value

Returns a numeric which is the value of the objective function.

References

MSPRT: Supplemental information

Johnson, Valen E., Uniformly most powerful Bayesian tests., Ann. of Stat., 41, (4), 2013, pp. 1716-1741

Examples

Run this code
# NOT RUN {
objfunc.oneProp(p= .5, delta= 25, n= 60, p0= 0.2)
# }

Run the code above in your browser using DataLab