pooledBin: Confidence intervals for a single proportion

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

Description

Calculates confidence intervals for a single proportion based on pooled testing experiments containing various different pool sizes.

Usage

1
2
3
4
5
pooledBin(x, m, n = rep(1, length(x)),
 pt.method = c("firth", "gart", "bc-mle", "mle", "mir"),
 ci.method = c("skew-score", "bc-skew-score", "score",
 "lrt", "wald", "mir"),
 scale = 1, alpha = 0.05, tol = .Machine$double.eps^0.5)

Arguments

x

a vector, specifying the observed number of positive pools, among the number of pools tested (n)

m

a vector of pool sizes, must have the same length as, x

n

a vector of the corresponding number of pools of sizes m

pt.method

a character string, specifying the point estimate to compute, with the following options: "bc-mle" bias-corrected MLE, the default; "mle" MLE, and "mir" MIR.

ci.method

a character string, specifying the confidence interval to compute, with options: "skew-score" skewness-corrected, the default, "score" the score, "bc-skew-score" bias- and skewness-corrected "lrt" likelihood ratio test, "wald" wald, and "mir" MIR.

scale

a single numeric, coefficient to scale the point estimates and intervals bounds in the print and summary method (print.poolbin, summary.poolbin)

alpha

a single numeric, specifying the type-I-error level

tol

accuracy required for iterations in internal functions

Details

Point estimation: bias preventative ("firth") and bias corrected ("gart") estimators are recommended, with details described in Hepworth G, Biggerstaff BJ (2017). Use of MLE ("mle"), and MIR ("mir") estimators is not recommended.

Confidence intervals: Note, that the methods "mir" and "wald" can not be recommended, because they return too narrow intervals in relevant situations, "mir" because it ignores the pooling, and "wald" because it relies on simple large sample methods. For computational details and simulation results of the remaining methods, see Biggerstaff (2008).

Value

A list with elements

p

the estimated proportion

lcl

the lower confidence limit

ucl

the upper confidence limit

pt.method

the method used for point estimation

ci.method

the method used for interval estimation

alpha

the type-I-error level

x

the numbers of postive pools

m

the size of the pools

n

the numbers of pools with corresponding pool sizes m

scale

Scaling coefficient for the output

Author(s)

Brad Biggerstaff

References

Walter SD, Hildreth SW, Beaty BJ: Estimation of infection rates in population of organisms using pools of variable size. Am J Epidemiol 1980, 112(1):124-128

Hepworth G: Estimation of proportions by group testing. PhD Dissertation. Melbourne, Australia: The University of Melbourne; 1999.

Biggerstaff BJ (2008): Confidence interval for the difference of proportions estmimated from pooled samples. Journal of Agricultural Biological and Environmental Statistics 2008, 13(4):478-496.

Hepworth G, Biggerstaff BJ: Bias correction in estimating Proportions by pooled testing. JABES 20178, to appear.

See Also

bgtvs to compute exact confidence intervals for one proportion in designs with different pool sizes. Note that bgtvs can only deal with a limited number of different pool sizes.

bgtCI to compute exact or asymptotic confidence intervals for one proportion in designs with a common pool size in all pools.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Consider an imaginary example, where pools of size
# 1, 5, 10 and 50 are tested, 5 pools of each size
# among the 5 pools with size 1 and 5, no pool is positive,
# while among the 5 pools of size 10 and 50, 1 and 2 positive
# pools are identified, respectively. 

x1 <- c(0,0,1,2)
m1 <- c(1,5,10,50)
n1 <- c(5,5,5,5)

pooledBin(x=x1, m=m1, n=n1)
pooledBin(x=x1, m=m1, n=n1, scale=1000)

pooledBin(x=x1, m=m1, n=n1)

summary(pooledBin(x=x1, m=m1, n=n1), scale=1000)

# For another population, tested with the same design, one might find:
# 1 positive result among the pools pooling 5 elements,
# no positive result among the pools pooling 10 elements,
# 4 positive results among the pools pooling 50 elements,

x2<-c(0,1,0,4)
m2 <- c(1,5,10,50)
n2 <- c(5,5,5,5)

pooledBin(x=x2, m=m2, n=n2)

# Some other methods for the confidence bounds:

pooledBin(x=x2, m=m2, n=n2, ci.method="lrt")


###
# Reproducing some of the estimates from Table 1 in
# Hepworth & Biggerstaff (2017):

pooledBin(x=c(1,2), m=c(20,5), n=c(8,8), pt.method="firth", ci.method="lrt")

pooledBin(x=c(7,8), m=c(20,5), n=c(8,8), pt.method="firth", ci.method="lrt")

binGroup documentation built on May 2, 2019, 8:57 a.m.