Description Usage Arguments Details Value Author(s) References See Also Examples
Calculates the point estimate, the exact ClopperPearson and Blaker CI, the Score test derived Wilson and AgrestiCoull CI, the asymptotic secondorder corrected interval fo Cai and the Wald CI for a single binomial proportion estimated from a binomial group testing trial. Assumes equal group sizes, an assay method classifying a group as positive if at least one unit in the group is positive, individuals units randomly assigned to the groups.
1 2  bgtCI(n, s, y, conf.level = 0.95,
alternative = "two.sided", method = "CP")

n 
integer, specifying the number of groups (i.e. assays i.e. observations) 
s 
integer, specifying the common size of groups i.e. the number of individual units in each group 
y 
integer, specifying the number of positive groups 
conf.level 
nominal confidence level of the interval 
alternative 
character string defining the alternative hypothesis, either 'two.sided', 'less' or 'greater' where 'less' gives the only an upper bound with confidence level=conf.level 'greater' gives the only a lower bound with confidence level=conf.level and 'two.sided' gives a twosided confidence interval with confidence level=conf.level 
method 
character string defining the method for CI calculation, where: "CP" is ClopperPearson, an exact tail interval showing symmetric coverage probability (inversion of two onesided tests), "Blaker" is the Blaker interval, an exact interval, inversion of one two.sided test, therefore defined only two.sided, but shorter than the twosided ClopperPearson CI. Both guarantee to contain the true parameter with at least conf.level*100 percent probability, "AC" is the AgrestiCoull (generalized AgrestiCoull) interval, asymptotic method, "Score" is Wilson Score, asymptotic method derived from inversion of the Score test, "SOC" is the second order corrected interval, asymptotic method for onesided problems (for details see Cai, 2005), and "Wald" the Wald interval, which cannot be recommended. 
This function allows the computation of confidence intervals for binomial group testing as described in Tebbs & Bilder (2004) and Schaarschmidt (2007). If an actual confidence level greater or equal to that specified in the conf.level argument shall always be guaranteed, the exact method of ClopperPearson (method="CP") can be recommended for onesided and the improved method of Blaker (2000) (method="Blaker") can be recommended for twosided hypotheses. If a mean confidence level close to that specified in the argument conf.level is required, but moderate violation of this level is acceptable, the SecondOrder corrected (method="SOC"), Wilson Score (method="Score") or AgrestiCoull (method="AC") might be used (Brown, Cai, DasGupta, 2001; Cai 2005).
A list containing:
conf.int 
a confidence interval for the proportion 
estimate 
the point estimator of the proportion 
Frank Schaarschmidt
Blaker H (2000). Confidence curves and improved exact confidence intervals for discrete distributions. The Canadian Journal of Statistics 28 (4), 783798.
Brown LD, Cai TT, DasGupta A (2001). Interval estimation for a binomial proportion. Statistical Science 16 (2), 101133.
Cai TT (2005). Onesided confidence intervals in discrete distributions. Journal of Statistical Planning and Inference 131, 6388.
Schaarschmidt F (2007). Experimental design for onesided confidence intervals or hypothesis tests in binomial group testing. Communications in Biometry and Crop Science 2 (1), 3240. http://agrobiol.sggw.waw.pl/cbcs/
Tebbs JM & Bilder CR (2004). Confidence interval procedures for the probability of disease transmission in multiplevectortransfer designs. Journal of Agricultural, Biological and Environmental Statistics, 9 (1), 7590.
pooledBin
for asymptotic confidence intervals and bgtvs
for an exact confidence interval when designs with different group sizes are used
bgtTest
: for hypothesis tests in binomial group testing
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  # See the example in Tebbs and Bilder (2004)
# the two.sided 95percent
# ClopperPearson as default method:
bgtCI(n=24,y=3,s=7)
bgtCI(n=24,y=3,s=7,conf.level=0.95,
alternative="two.sided", method="CP")
# other methods:
# Blaker CI is exact but shorter
# than ClopperPearson, only two.sided
bgtCI(n=24,y=3,s=7, alternative="two.sided",
method="Blaker")
# the asymptotic Wilson CI might even
# be shorter:
bgtCI(n=24,y=3,s=7, alternative="two.sided",
method="Score")
# onesided confidence intervals:
bgtCI(n=24,y=3,s=7, alternative="less", method="CP")
# Wilson Score interval is less conservative
bgtCI(n=24,y=3,s=7, alternative="less", method="Score")
# the secondorder corrected CI is even shorter
# in this situation:
bgtCI(n=24,y=3,s=7, alternative="less", method="SOC")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.