ciss.pool.waldtype: Sample size calculations for fixed pool size and perfect test

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Calculate sample size for a binomial proportion based on Wald type confidence interval for pooled samples using a perfect test

Usage

1
ciss.pool.wald(pi0, alpha, d, k)

Arguments

pi0

hypothesized upper bound (if below 0.5, if above 0.5 then lower bound) on the parameter π_0

alpha

an (1-α/2)\cdot 100\% confidence interval is computed

d

half width of the confidence interval

k

The pool size

Details

Sample size calculation based on width of Wald confidence intervals for pooled sample. The equation is

n = ≤ft\lceil ≤ft( \frac{z_{1-α/2} (1-π_0)}{d k} \right)^2 \cdot ≤ft((1-π_0)^{-k} - 1\right) \right\rceil

Value

the necessary sample size n

Author(s)

M. H<f6>hle

References

D. D. Worlund and G. Taylor (1983), Estimation of Disease Incidence in Fish Populations, Can. J. Fish. Aquat. Sci., 40:2194-2197.

See Also

poolbinom.wald

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
k <- 1:50
n <- sapply(k, function(k) ciss.pool.wald(pi0=0.1, alpha=0.05,k=k, d=0.05))
#sizes <- cbind(k=k, n=n, N=n*k)
plot(k, n, type="s",xlab="Pool size",ylab="Number of pools")
plot(k*n,n,type="s",xlab="Total size",ylab="Number of pools")

ciss.pool.wald(pi0=0.1, d=0.01, alpha=0.05, k=10)
#Compare with ciss.binom function
np02x <- function(n,p0,k) round( (1-(1-p0)^k)*n )
(n <- ciss.binom( p0=0.1, d=0.01, alpha=0.05, ci.fun=poolbinom.wald,
            np02x=np02x, k=10))

binomSamSize documentation built on May 1, 2019, 10:14 p.m.