Learn R Programming

binGroup (version 2.2-1)

opt.pool.size: Find the optimal pool size for Optimal Dorfman or Thresholded Optimal Dorfman

Description

Find the optimal common pool size for Optimal Dorfman (OD) or Thresholded Optimal Dorfman (TOD) testing.

Usage

opt.pool.size(p, max.p, se = 1, sp = 1)

Arguments

p

a vector of each individual's probability of infection.

max.p

the maximum allowable pool size.

se

the sensitivity of the diagnostic test.

sp

the specificity of the diagnostic test.

Value

The optimal common pool size for OD or TOD testing.

Details

This function finds the optimal common pool size for OD or TOD testing. Using OD testing, all individuals are tested using an optimal common pool size. Using TOD testing, individuals are partitioned into low-risk and high-risk groups, and all low-risk individuals are tested using an optimal common pool size. See McMahan et al. (2012) for additional details on the implementation of OD or TOD testing.

References

McMahan2012abinGroup

See Also

http://chrisbilder.com/grouptesting

Other Informative Dorfman functions: accuracy.dorf, characteristics.pool, inf.dorf.measures, opt.info.dorf, pool.specific.dorf, thresh.val.dorf

Examples

Run this code
# NOT RUN {
# 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(8135)
p.vec <- p.vec.func(p=0.02, alpha=1, grp.sz=10)
opt.pool.size(p=p.vec, max.p=3, se=0.95, sp=0.95)
# }

Run the code above in your browser using DataLab