expectOrderBeta {binGroup2}R Documentation

Determine a vector of probabilities for informative group testing algorithms

Description

Find the expected value of order statistics from a beta distribution. This function is used to provide a set of individual risk probabilities for informative group testing.

Usage

expectOrderBeta(
  p,
  alpha,
  size,
  grp.sz,
  num.sim = 10000,
  rel.tol = ifelse(alpha >= 1, .Machine$double.eps^0.25, .Machine$double.eps^0.1),
  ...
)

Arguments

p

overall probability of disease that will be used to determine a vector of individual risk probabilities. This is the expected value of a random variable with a beta distribution, α/(α + β).

alpha

a shape parameter for the beta distribution that specifies the degree of heterogeneity for the determined probability vector.

size

the size of the vector of individual risk probabilities to be generated. This is also the number of total individuals for which to determine risk probabilities.

grp.sz

the number of total individuals for which to determine risk probabilities. This argument is deprecated; the size argument should be used instead.

num.sim

the number of simulations. This argument is used only when simulation is necessary.

rel.tol

relative tolerance used for integration.

...

arguments to be passed to the beta.dist function written by Michael Black for Black et al. (2015).

Details

This function uses the beta.dist function from Black et al. (2015) to determine a vector of individual risk probabilities, ordered from least to greatest. Depending on the specified probability, α level, and overall group size, simulation may be necessary in order to determine the probabilities. For this reason, the user should set a seed in order to reproduce results. The number of simulations (default = 10,000) and relative tolerance for integration can be specified by the user. The expectOrderBeta function augments the beta.dist function by checking whether simulation is needed before attempting to determine the probabilities, and by allowing the number of simulations to be specified by the user. See Black et al. (2015) for additional details on the original beta.dist function.

Value

A vector of individual risk probabilities.

Author(s)

Brianna D. Hitt

References

Black, M., Bilder, C., Tebbs, J. (2015). “Optimal retesting configurations for hierarchical group testing.” Journal of the Royal Statistical Society. Series C: Applied Statistics, 64, 693–710. doi: 10.1111/rssc.12097, https://doi.org/10.1111/rssc.12097.

See Also

expectOrderBeta for generating a vector of individual risk probabilities and informativeArrayProb for arranging a vector of individual risk probabilities in a matrix for informative array testing without master pooling.

Examples

set.seed(8791)
expectOrderBeta(p = 0.03, alpha = 0.5, size = 100, rel.tol = 0.0001)

expectOrderBeta(p = 0.05, alpha = 2, size = 40)

[Package binGroup2 version 1.1.0 Index]