Description Usage Arguments Details Value Author(s) References See Also Examples
Generate a vector of individual risk probabilities using an overall probability of disease (i.e., the expected value of order statistics from a beta distribution) for use with informative group testing algorithms.
1 | p.vec.func(p, alpha, grp.sz)
|
p |
overall probability of disease that will be used to generate a vector of individual risk probabilities. |
alpha |
a shape parameter for the beta distribution that specifies the degree of heterogeneity for the generated probability vector. |
grp.sz |
the number of total individuals for which to generate risk probabilities. |
This function uses Michael Black's beta.dist
function to generate a vector of individual risk probabilities,
ordered from least to greatest. Depending on the specified
probability, alpha level, and overall group size, simulation
may be necessary in order to generate the vector of individual
probabilities. For this reason, the user should set a seed in
order to reproduce results. The p.vec.func function
augments the beta.dist
function by checking whether
simulation is needed before attempting to generate the vector
of individual risk probabilities. See Black et al. (2015)
for additional details on Michael Black's beta.dist
function.
A vector of individual risk probabilities.
Brianna D. Hitt
Black2015binGroup
Informative.array.prob
for arranging a vector
of individual risk probabilities in a matrix for informative
array testing without master pooling and beta.dist
for the function on which p.vec.func is based on.
http://chrisbilder.com/grouptesting
Other Individual risk probability functions: Informative.array.prob
,
beta.dist
1 2 3 4 5 6 7 8 9 10 11 12 13 | # This example takes less than 1 second to run.
# Estimated running time was calculated using a
# computer with 16 GB of RAM and one core of an
# Intel i7-6500U processor.
set.seed(8791)
p.vec.func(p=0.03, alpha=0.5, grp.sz=100)
# This example takes less than 1 second to run.
# Estimated running time was calculated using a
# computer with 16 GB of RAM and one core of an
# Intel i7-6500U processor.
set.seed(52613)
p.vec.func(p=0.005, alpha=2, grp.sz=40)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.