umpu.binom {ump} | R Documentation |
UMPU Test for the Binomial Distribution
Description
Calculate the uniformly most powerful unbiased (UMPU) two-tailed test for the binomial distribution.
Usage
umpu.binom(x, n, p, alpha, maxiter = 10, tol = 1e-9)
Arguments
x |
binomial observations. |
n |
number of observations. |
p |
the success probability under the null hypothesis. |
alpha |
the significance level. |
maxiter |
the maximum number of iterations allowed. |
tol |
tolerance used in testing floating point numbers. |
Details
At most one of x
, p
, and alpha
is allowed to be
a vector. Evaluates the critical function for the UMPU two-tailed
test for the binomial distribution, which satisfies the following
x <- seq(0, n) phix <- umpu.binom(x, n, p, alpha) px <- dbinom(x, n, p) sum(phix * px) == alpha sum(x * phix * px) == n * p * alpha
when p
is strictly between zero and one.
Value
a vector of values of the critical function.
Examples
library(ump)
umpu.binom(0:10, 10, 0.6, 0.1)
[Package ump version 0.5-8 Index]