mpa: Number of Assays Needed using Mini-Pooling with Algorithm...

Description Usage Arguments Details Value References See Also Examples

Description

Function mpa(...) calculates the number of assays required, when using MPA, for pools that are formed following the order of individual samples in the data.

Usage

1
mpa(v, K = 5, vf_cut = 1000, lod = 0, msg = T)

Arguments

v

A vector of non-negative numerical assay results.

K

Pool size; default is K = 5.

vf_cut

Cutoff value for defining positive cases; default is vf_cut = 1000.

lod

A vector of lower limits of detection or a scalar if the limits are the same; default is lod = 0.

msg

Message generated during calculation; default is TRUE.

Details

For a given sample v_i, i = 1, ..., N, the first K samples v_1, ..., v_5 are combined to form a pool, the next K samples v_6, ..., v_10 are combined to form the second pool, and so on. If the number of samples for the last pool is less than K, these remaining samples are not used to form a pool (i.e. not included in the calculation) . Therefore, a total of N%/%K pools are formed. The function calculates the number of assays needed for each of these pools. See May et al (2010).

Value

A vectorof length N%/%K for the numbers of assays needed for all pools that are formed.

References

May, S., Gamst, A., Haubrich, R., Benson, C., & Smith, D. M. (2010). Pooled nucleic acid testing to identify antiretroviral treatment failure during HIV infection. Journal of acquired immune deficiency syndromes (1999), 53(2), 194.

See Also

minipool, mmpa, pooling_mc

Examples

1
2
3
4
5
6
7
8
9
K=5; n = 50;
n.pool  = n/K; n.pool
#   [1] 10
set.seed(100)
pvl = rgamma(n, shape = 2.8, scale = 150)
mpa(v = pvl)
#  A total of 10 pools are formed.
#   The numbers of assays required by these pools are:
#   [1] 3 3 4 4 2 5 4 4 4 4

taotliu/mMPA documentation built on May 31, 2019, 2:58 a.m.