Description Usage Arguments Details Value Author(s) References See Also Examples
Calculate logit based confidence interval for the the Bernoulli proportion of k*n individuals, which are pooled into n pools each of size k. Observed is the number of positive pools x.
1 2 | poolbinom.wald(x, k, n, conf.level=0.95)
poolbinom.logit(x, k, n, conf.level=0.95)
|
x |
Number of positive pools (can be a vector). |
k |
Pool size (can be a vector). |
n |
Number of pools (can be a vector). |
conf.level |
The level of confidence to be used in the confidence interval |
Assume the individual probability of experiencing the event for each of k\cdot n individuals is π, i.e. the response is Bernoulli distributed X_i \sim B(π). For example π could be the prevalence of a disease in veterinary epidemiology.
Now, instead of considering each individual the k\cdot n samples are pooled into n pools each of size k. A pool is positive if there is at least one positive in the pool. Let X be the number of positive pools. Then
X \sim Bin(n, 1-(1-π)^k)
.
The present function computes an estimator and confidence interval for
π by computing the MLE and standard error for
\hat{π}. A Wald confidence interval is formed using
\hat{π} \pm z_{1-α/2}\cdot se(\hat{π}). In case of
poolbinom.logit
a logit transformation is used, i.e. the
standard error for logit(\hat{π}) is computed and the Wald-CI
is derived on the logit-scale which is then backtransformed using the
inverse logit function. In case x=0 or x=n the logit of
\hat{π} is not defined and hence the confidence interval is
not defined in these two situation. To fix the problem we use the
intervals (0,
\hat{π}_u(x=0)) and (\hat{π}_l(x=n),1), respectively, where
π_u and π_o are the respective borders of a
corresponding LRT interval.
The poolbinom.wald
approach corresponds to method 2 in the
Cowling et al. (1999). The logit transformation improves on this
procedure, because the method ensures that the interval is in the
range (0,1).
A data.frame containing the observed proportions and the lower and
upper bounds of the confidence interval. The style is similar
to the binom.confint
function of the binom
package
M. H<f6>hle
D. W. Cowling, I. A. Gardner, W. O. Johnson (1999), Comparison of methods for estimation of individual level prevalence based on pooled samples, Preventive Veterinary Medicine, 39:211–225
1 2 3 4 | poolbinom.wald(x=0, k=10, n=34, conf.level=0.95)
poolbinom.logit(x=0:1, k=10, n=34, conf.level=0.95)
poolbinom.logit(x=1, k=seq(10,100,by=10), n=34, conf.level=0.95)
poolbinom.logit(x=0:34,k=1,n=34)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.