poolbinom.waldtype: Calculate logit based confidence interval for binomial...

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

Description

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.

Usage

1
2
poolbinom.wald(x, k, n, conf.level=0.95)
poolbinom.logit(x, k, n, conf.level=0.95)

Arguments

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

Details

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).

Value

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

Author(s)

M. H<f6>hle

References

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

See Also

poolbinom.lrt

Examples

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)

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