Description Usage Arguments Details Value Author(s) References See Also Examples
Calculate sample size for a binomial proportion based on Wald type confidence interval for pooled samples using a perfect test
1 | ciss.pool.wald(pi0, alpha, d, k)
|
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 |
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
the necessary sample size n
M. H<f6>hle
D. D. Worlund and G. Taylor (1983), Estimation of Disease Incidence in Fish Populations, Can. J. Fish. Aquat. Sci., 40:2194-2197.
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.