mmpa {mMPA} | R Documentation |
Function mmpa(...)
calculates the number of assays required, when
using mMPA, for
pools that are formed following the order of individual samples in the data.
mmpa(v, s, K = 5, vf_cut = 1000, lod = 0, msg = T)
v |
A vector of non-negative numerical assay results. |
s |
A vector of risk scores; |
K |
Pool size; default is |
vf_cut |
Cutoff value for defining positive cases;
default is |
lod |
A vector of lower limits of detection or a scalar if the limits are the
same; default is |
msg |
Message generated during calculation; default is |
For a given sample (v_i, s_i), i = 1, ..., N, the first K
samples are combined to
form a pool, the next K
samples 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.
A vectorof length N%/%K
for the numbers of assays needed for all pools
that are formed.
Liu T, Hogan JW, Daniels, MJ, Coetzer M, Xu Y, Bove G, et al. Improved HIV-1 Viral Load Monitoring Capacity Using Pooled Testing with Marker-Assisted Deconvolution. Journal of AIDS. 2017;75(5): 580-587.
Bilder CR, Tebbs JM, Chen P. Informative retesting. Journal of the American Statistical Association. 2010;105(491):942-955.
May S, Gamst A, Haubrich R, Benson C, Smith DM. Pooled nucleic acid testing to identify antiretroviral treatment failure during HIV infection. Journal of Acquired Immune Deficiency Syndromes. 2010;53(2):194-201.
K=5; n = 50;
n.pool = n/K; n.pool
# [1] 10
set.seed(100)
pvl = rgamma(n, shape = 2.8, scale = 150)
riskscore = (rank(pvl)/n) * 0.5 + runif(n) * 0.5
mmpa(v = pvl, s = riskscore)
# A total of 10 pools are formed.
# The numbers of assays required by these pools are:
# [1] 3 3 4 4 2 3 3 4 3 3