gtWidth {binGroup2}R Documentation

Expected width of confidence intervals in group testing

Description

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.

Usage

gtWidth(n, s, p, conf.level = 0.95, alternative = "two.sided", method = "CP")

Arguments

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

Details

The two-sided (method="two.sided") option calculates the expected width between the lower and upper bound of a two-sided conf.level*100 percent confidence interval. See Tebbs & Bilder (2004) for expression. The one-sided (method="less" or method="greater") options calculate the expected distance between the one-sided limit and the assumed true proportion p for a one-sided conf.level*100 percent confidence interval.

Value

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.

Author(s)

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.

References

Tebbs, J., Bilder, C. (2004). “Confidence interval procedures for the probability of disease transmission in multiple-vector-transfer designs.” Journal of Agricultural, Biological, and Environmental Statistics, 9, 75–90. doi: 10.1198/1085711043127, https://doi.org/10.1198/1085711043127.

See Also

propCI for confidence intervals in group testing.

Other estimation functions: designEst(), designPower(), gtPower(), gtTest(), propCI(), propDiffCI()

Examples

# 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")

[Package binGroup2 version 1.1.0 Index]