gtWidth {binGroup2}  R Documentation 
Calculation of the expected value of the width of
confidence intervals for one proportion in group testing. Calculations
are available for the confidence interval methods in propCI
.
gtWidth(n, s, p, conf.level = 0.95, alternative = "two.sided", method = "CP")
n 
integer specifying the number of groups. A vector of integers is also allowed. 
s 
integer specifying the common size of groups. A vector of integers is also allowed. 
p 
the assumed true proportion of individuals showing the trait to be estimated. A vector is also allowed. 
conf.level 
the required confidence level of the interval. 
alternative 
character string specifying the alternative hypothesis, either "two.sided", "less", or "greater". 
method 
character string specifying the confidence
interval method. Available options include those in

The twosided (method="two.sided") option calculates the expected width between the lower and upper bound of a twosided conf.level*100 percent confidence interval. See Tebbs & Bilder (2004) for expression. The onesided (method="less" or method="greater") options calculate the expected distance between the onesided limit and the assumed true proportion p for a onesided conf.level*100 percent confidence interval.
A matrix containing the columns:
ns 
the resulting total number of units, n*s. 
n 
the number of groups. 
s 
the group size. 
p 
the assumed true proportion. 
expCIWidth 
the expected value of the confidence interval width as defined under the argument alternative. 
This function was originally written as bgtWidth
by Frank
Schaarschmidt for the binGroup
package. Minor modifications have
been made for inclusion of the function in the binGroup2
package.
Tebbs, J., Bilder, C. (2004). “Confidence interval procedures for the probability of disease transmission in multiplevectortransfer designs.” Journal of Agricultural, Biological, and Environmental Statistics, 9, 75–90. doi: 10.1198/1085711043127, https://doi.org/10.1198/1085711043127.
propCI
for confidence intervals in
group testing.
Other estimation functions:
designEst()
,
designPower()
,
gtPower()
,
gtTest()
,
propCI()
,
propDiffCI()
# Examine different group sizes to determine # the shortest expected width. gtWidth(n = 20, s = seq(from = 1, to = 200, by = 10), p = 0.01, alternative = "less", method = "CP") # Calculate the expected width of the confidence # interval with a group size of 1 (individual testing). gtWidth(n = 20, s = 1, p = 0.005, alternative = "less", method = "CP")