Summary measures for Sterrett algorithms.

Sterrett(
  p,
  Sp,
  Se,
  plot = FALSE,
  plot.cut.dorf = FALSE,
  cond.prob.plot = FALSE,
  font.name = "sans"
)

Arguments

p

a vector of individual risk probabilities.

Sp

the specificity of the diagnostic test.

Se

the sensitivity of the diagnostic test.

plot

logical; if TRUE, a plot of the informative Sterrett CDFs will be displayed. Further details are given under 'Details'.

plot.cut.dorf

logical; if TRUE, the cut-tree for Dorfman testing will be displayed. Further details are given under 'Details'.

cond.prob.plot

logical; if TRUE, a second axis for the conditional probability plot will be displayed on the right side of the plot.

font.name

the name of the font to be used in plots.

Value

A list containing:

mean.sd

a data frame containing the mean and standard deviation of the expected number of tests for one-stage informative Sterrett (1SIS), two-stage informative Sterrett (2SIS), full informative Sterrett (FIS), and Dorfman testing.

PMF

a data frame containing the probability mass function for the number of tests possible for one-stage informative Sterrett (1SIS), two-stage informative Sterrett (2SIS), full informative Sterrett (FIS), and Dorfman testing.

CDF

a data frame containing the cumulative distribution function for the number of tests possible for one-stage informative Sterrett (1SIS), two-stage informative Sterrett (2SIS), full informative Sterrett (FIS), and Dorfman testing.

cond.PMF

a data frame containing the conditional probability mass function for the number of tests possible for one-stage informative Sterrett (1SIS), two-stage informative Sterrett (2SIS), and full informative Sterrett (FIS) testing.

cond.moments

a data frame containing the mean and standard deviation of the conditional moments for one-stage informative Sterrett (1SIS), two-stage informative Sterrett (2SIS), and full informative Sterrett (FIS) testing.

save.diff.CDF

a data frame containing the sum of the differences in the cumulative distribution function for each pairwise comparison of one-stage informative Sterrett (1SIS), two-stage informative Sterrett (2SIS), full informative Sterrett (FIS), and Dorfman testing.

p

a vector containing the probabilities of positivity for each individual.

Details

This function calculates summary measures for informative Sterrett algorithms. Informative algorithms include one-stage informative Sterrett (1SIS), two-stage informative Sterrett (2SIS), full informative Sterrett (FIS), and Dorfman (two-stage hierarchical testing).

The mean and standard deviation of the number of tests, probability mass function (PMF), and cumulative distribution function (CDF) are calculated for all informative Sterrett algorithms and Dorfman testing. Conditional PMFs and conditional moments are calculated for all informative Sterrett algorithms. Subtracting the mean number of tests for two procedures gives the area difference between their CDFs. This area difference is calculated for each pairwise comparison of 1SIS, 2SIS, FIS, and Dorfman testing. CDF plots provide a visualization of how probabilities are distributed over the number of tests. CDFs that increase more rapidly to 1 correspond to more efficient retesting procedures.

Non-informative Sterrett (NIS) decodes positive groups by retesting individuals at random, so there are \(I!\) different possible NIS implementations. CDFs are found by permuting the elements in the vector of individual risk probabilities and using the FIS CDF expression without reordering the individual probabilities. That is, the FIS procedure uses the most efficient NIS implementation, which is to retest individuals in order of descending probabilities. When implementing the informative Sterrett algorithms with a large number of individuals, an algorithm is used to compute the PMF for the number of tests under FIS. This is done automatically by Sterrett for \(I>12\). The algorithm is described in detail in the Appendix of Bilder et al. (2010).

References

Bilder, C., Tebbs, J., Chen, P. (2010). “Informative retesting.” Journal of the American Statistical Association, 105, 942–955.

See also

expectOrderBeta for generating a vector of individual risk probabilities for informative group testing and opChar1 for calculating operating characteristics with hierarchical and array-based group testing algorithms.

Other operating characteristic functions: GroupMembershipMatrix(), TOD(), halving(), operatingCharacteristics1(), operatingCharacteristics2()

Author

This function was originally written as info.gt by Christopher Bilder for Bilder et al. (2010). The function was obtained from http://chrisbilder.com/grouptesting/. Minor modifications were made for inclusion of the function in the binGroup2 package.

Examples

# Example 1: FIS provides the smallest mean
#   number of tests and the smallest standard
#   deviation. 2SIS has slightly larger mean
#   and standard deviation than FIS, but
#   its performance is comparable, indicating
#   2SIS may be preferred because it is
#   easier to implement.
set.seed(1231)
p.vec1 <- rbeta(n = 8, shape1 = 1, shape2 = 10)
save.it1 <- Sterrett(p = p.vec1, Sp = 0.90, Se = 0.95)
save.it1
#> 
#>  PMF 
#>    tests one.stage.IS.PMF two.stage.IS.PMF  full.IS.PMF Dorfman.PMF
#> 1      1       0.48835471       0.48835471 4.883547e-01   0.4883547
#> 2      3       0.09599437       0.09599437 9.599437e-02          NA
#> 3      4       0.07394624       0.07394624 7.394624e-02          NA
#> 4      5       0.04488706       0.06729731 6.729731e-02          NA
#> 5      6       0.03972361       0.06516755 6.516755e-02          NA
#> 6      7       0.02005756       0.05073281 5.444685e-02          NA
#> 7      8       0.01199658       0.03078615 3.887818e-02          NA
#> 8      9       0.04084418       0.05308898 6.080128e-02   0.5116453
#> 9     10       0.18419568       0.03045444 3.711694e-02          NA
#> 10    11               NA       0.04417744 1.426534e-02          NA
#> 11    12               NA               NA 3.262503e-03          NA
#> 12    13               NA               NA 4.362291e-04          NA
#> 13    14               NA               NA 3.151575e-05          NA
#> 14    15               NA               NA 9.742431e-07          NA
#> 
#>  Mean and standard deviation 
#>    Method     mean       sd
#> 1    1SIS 3.980830 3.566401
#> 2    2SIS 3.669331 3.201135
#> 3     FIS 3.612345 3.095739
#> 4 Dorfman 5.093162 3.998915

# Example 2: One individual is "high risk" and
#   the others are "low risk". Since there is
#   only one high-risk individual, the three
#   informative Sterrett procedures perform
#   similarly. All three informative Sterrett
#   procedures offer large improvements over
#   Dorfman testing.
p.vec2 <- c(rep(x = 0.01, times = 9), 0.5)
save.it2 <- Sterrett(p = p.vec2, Sp = 0.99, Se = 0.99)
save.it2
#> 
#>  PMF 
#>    tests one.stage.IS.PMF two.stage.IS.PMF  full.IS.PMF Dorfman.PMF
#> 1      1      0.457623451      0.457623451 4.576235e-01   0.4576235
#> 2      3      0.443665745      0.443665745 4.436657e-01          NA
#> 3      4      0.004573797      0.004573797 4.573797e-03          NA
#> 4      5      0.004527994      0.009011738 9.011738e-03          NA
#> 5      6      0.004482659      0.009010726 9.010726e-03          NA
#> 6      7      0.004437787      0.009008842 9.097171e-03          NA
#> 7      8      0.004393373      0.009006102 9.182748e-03          NA
#> 8      9      0.004349413      0.009002524 9.269199e-03          NA
#> 9     10      0.004305902      0.008998125 9.356497e-03          NA
#> 10    11      0.017294239      0.022024328 2.247606e-02   0.5423765
#> 11    12      0.050345641      0.014470169 1.501690e-02          NA
#> 12    13               NA      0.003604455 1.619568e-03          NA
#> 13    14               NA               NA 9.329207e-05          NA
#> 14    15               NA               NA 3.048583e-06          NA
#> 15    16               NA               NA 6.026634e-08          NA
#> 16    17               NA               NA 7.178150e-10          NA
#> 17    18               NA               NA 4.761248e-12          NA
#> 18    19               NA               NA 1.355528e-14          NA
#> 
#>  Mean and standard deviation 
#>    Method     mean       sd
#> 1    1SIS 2.799251 2.754353
#> 2    2SIS 2.674921 2.433704
#> 3     FIS 2.670015 2.416430
#> 4 Dorfman 6.423765 4.982010

# Example 3: Two individuals are at higher
#   risk than the others. All three informative
#   Sterrett procedures provide large
#   improvements over Dorfman testing.
# Due to the large initial group size, an
#   algorithm (described in the Appendix of
#   Bilder et al. (2010)) is used for FIS.
#   The Sterrett() function does this
#   automatically for I>12.
p.vec3 <- c(rep(x = 0.01, times = 98), 0.1, 0.1)
save.it3 <- Sterrett(p = p.vec3, Sp = 0.99, Se = 0.99)
save.it3
#> 
#>  PMF 
#>     tests one.stage.IS.PMF two.stage.IS.PMF   full.IS.PMF Dorfman.PMF
#> 1       1      0.306455946      0.306455946  3.064559e-01   0.3064559
#> 2       3      0.033353253      0.033353253  3.335325e-02          NA
#> 3       4      0.032954071      0.032954071  3.295407e-02          NA
#> 4       5      0.003045396      0.006994767  6.994767e-03          NA
#> 5       6      0.003013996      0.003742329  3.742329e-03          NA
#> 6       7      0.002982934      0.003763610  3.807238e-03          NA
#> 7       8      0.002952208      0.003784067  3.841593e-03          NA
#> 8       9      0.002921811      0.003803714  3.876891e-03          NA
#> 9      10      0.002891742      0.003822568  3.912522e-03          NA
#> 10     11      0.002861996      0.003840643  3.948500e-03          NA
#> 11     12      0.002832569      0.003857954  3.984829e-03          NA
#> 12     13      0.002803457      0.003874515  4.021513e-03          NA
#> 13     14      0.002774658      0.003890339  4.058554e-03          NA
#> 14     15      0.002746168      0.003905442  4.095957e-03          NA
#> 15     16      0.002717982      0.003919836  4.133724e-03          NA
#> 16     17      0.002690097      0.003933535  4.171859e-03          NA
#> 17     18      0.002662511      0.003946552  4.210366e-03          NA
#> 18     19      0.002635219      0.003958900  4.249249e-03          NA
#> 19     20      0.002608218      0.003970592  4.288510e-03          NA
#> 20     21      0.002581505      0.003981640  4.328154e-03          NA
#> 21     22      0.002555077      0.003992058  4.368185e-03          NA
#> 22     23      0.002528930      0.004001856  4.408605e-03          NA
#> 23     24      0.002503061      0.004011047  4.449420e-03          NA
#> 24     25      0.002477468      0.004019643  4.490632e-03          NA
#> 25     26      0.002452146      0.004027655  4.532246e-03          NA
#> 26     27      0.002427093      0.004035094  4.574265e-03          NA
#> 27     28      0.002402305      0.004041973  4.616694e-03          NA
#> 28     29      0.002377780      0.004048301  4.659536e-03          NA
#> 29     30      0.002353516      0.004054090  4.702795e-03          NA
#> 30     31      0.002329507      0.004059350  4.746476e-03          NA
#> 31     32      0.002305753      0.004064092  4.790582e-03          NA
#> 32     33      0.002282250      0.004068326  4.835118e-03          NA
#> 33     34      0.002258996      0.004072062  4.880088e-03          NA
#> 34     35      0.002235986      0.004075310  4.925495e-03          NA
#> 35     36      0.002213220      0.004078081  4.971345e-03          NA
#> 36     37      0.002190693      0.004080383  5.017641e-03          NA
#> 37     38      0.002168404      0.004082226  5.064388e-03          NA
#> 38     39      0.002146349      0.004083619  5.111590e-03          NA
#> 39     40      0.002124526      0.004084573  5.159252e-03          NA
#> 40     41      0.002102933      0.004085095  5.207378e-03          NA
#> 41     42      0.002081567      0.004085194  5.255973e-03          NA
#> 42     43      0.002060425      0.004084880  5.305040e-03          NA
#> 43     44      0.002039505      0.004084161  5.354585e-03          NA
#> 44     45      0.002018805      0.004083045  5.404613e-03          NA
#> 45     46      0.001998321      0.004081541  5.455127e-03          NA
#> 46     47      0.001978052      0.004079656  5.506134e-03          NA
#> 47     48      0.001957995      0.004077400  5.557636e-03          NA
#> 48     49      0.001938148      0.004074779  5.609640e-03          NA
#> 49     50      0.001918508      0.004071802  5.662150e-03          NA
#> 50     51      0.001899074      0.004068477  5.715171e-03          NA
#> 51     52      0.001879843      0.004064810  5.768709e-03          NA
#> 52     53      0.001860812      0.004060809  5.822767e-03          NA
#> 53     54      0.001841980      0.004056481  5.877351e-03          NA
#> 54     55      0.001823344      0.004051835  5.932466e-03          NA
#> 55     56      0.001804902      0.004046876  5.988118e-03          NA
#> 56     57      0.001786653      0.004041611  6.044311e-03          NA
#> 57     58      0.001768593      0.004036048  6.101051e-03          NA
#> 58     59      0.001750722      0.004030193  6.158343e-03          NA
#> 59     60      0.001733036      0.004024052  6.216193e-03          NA
#> 60     61      0.001715533      0.004017633  6.274605e-03          NA
#> 61     62      0.001698213      0.004010942  6.333586e-03          NA
#> 62     63      0.001681072      0.004003984  6.393140e-03          NA
#> 63     64      0.001664109      0.003996766  6.453274e-03          NA
#> 64     65      0.001647322      0.003989294  6.513992e-03          NA
#> 65     66      0.001630709      0.003981574  6.575302e-03          NA
#> 66     67      0.001614269      0.003973611  6.637207e-03          NA
#> 67     68      0.001597998      0.003965413  6.699715e-03          NA
#> 68     69      0.001581895      0.003956983  6.762831e-03          NA
#> 69     70      0.001565960      0.003948328  6.826561e-03          NA
#> 70     71      0.001550189      0.003939454  6.890911e-03          NA
#> 71     72      0.001534580      0.003930365  6.955886e-03          NA
#> 72     73      0.001519133      0.003921067  7.021494e-03          NA
#> 73     74      0.001503846      0.003911565  7.087739e-03          NA
#> 74     75      0.001488716      0.003901865  7.154629e-03          NA
#> 75     76      0.001473742      0.003891971  7.222169e-03          NA
#> 76     77      0.001458923      0.003881888  7.290366e-03          NA
#> 77     78      0.001444256      0.003871621  7.359227e-03          NA
#> 78     79      0.001429740      0.003861174  7.428757e-03          NA
#> 79     80      0.001415373      0.003850554  7.498963e-03          NA
#> 80     81      0.001401155      0.003839763  7.569851e-03          NA
#> 81     82      0.001387082      0.003828808  7.641430e-03          NA
#> 82     83      0.001373155      0.003817691  7.713704e-03          NA
#> 83     84      0.001359370      0.003806418  7.786680e-03          NA
#> 84     85      0.001345727      0.003794992  7.860367e-03          NA
#> 85     86      0.001332224      0.003783419  7.934770e-03          NA
#> 86     87      0.001318859      0.003771702  8.009896e-03          NA
#> 87     88      0.001305632      0.003759845  8.085753e-03          NA
#> 88     89      0.001292540      0.003747853  8.162347e-03          NA
#> 89     90      0.001279582      0.003735729  8.239686e-03          NA
#> 90     91      0.001266757      0.003723477  8.317776e-03          NA
#> 91     92      0.001254063      0.003711101  8.396626e-03          NA
#> 92     93      0.001241499      0.003698605  8.476243e-03          NA
#> 93     94      0.001229064      0.003685992  8.556633e-03          NA
#> 94     95      0.001216756      0.003673266  8.637805e-03          NA
#> 95     96      0.001204573      0.003660430  8.719766e-03          NA
#> 96     97      0.001192516      0.003647489  8.802524e-03          NA
#> 97     98      0.001180581      0.003634445  8.886086e-03          NA
#> 98     99      0.001168768      0.003621303  8.970461e-03          NA
#> 99    100      0.001157076      0.003608064  9.055656e-03          NA
#> 100   101      0.004782683      0.007231913  1.277886e-02   0.6935441
#> 101   102      0.435432747      0.007652733  1.329996e-02          NA
#> 102   103               NA      0.231736159  1.068667e-02          NA
#> 103   104               NA               NA  6.511757e-03          NA
#> 104   105               NA               NA  3.108059e-03          NA
#> 105   106               NA               NA  1.203933e-03          NA
#> 106   107               NA               NA  3.894191e-04          NA
#> 107   108               NA               NA  1.075320e-04          NA
#> 108   109               NA               NA  2.579244e-05          NA
#> 109   110               NA               NA  5.448610e-06          NA
#> 110   111               NA               NA  1.025161e-06          NA
#> 111   112               NA               NA  1.733941e-07          NA
#> 112   113               NA               NA  2.656919e-08          NA
#> 113   114               NA               NA  3.712601e-09          NA
#> 114   115               NA               NA  4.757506e-10          NA
#> 115   116               NA               NA  5.618201e-11          NA
#> 116   117               NA               NA  6.140131e-12          NA
#> 117   118               NA               NA  6.233651e-13          NA
#> 118   119               NA               NA  5.898293e-14          NA
#> 119   120               NA               NA  5.216813e-15          NA
#> 120   121               NA               NA  4.324339e-16          NA
#> 121   122               NA               NA  3.367395e-17          NA
#> 122   123               NA               NA  2.468602e-18          NA
#> 123   124               NA               NA  1.706968e-19          NA
#> 124   125               NA               NA  1.115254e-20          NA
#> 125   126               NA               NA  6.895809e-22          NA
#> 126   127               NA               NA  4.040977e-23          NA
#> 127   128               NA               NA  2.247242e-24          NA
#> 128   129               NA               NA  1.187406e-25          NA
#> 129   130               NA               NA  5.967784e-27          NA
#> 130   131               NA               NA  2.855818e-28          NA
#> 131   132               NA               NA  1.302426e-29          NA
#> 132   133               NA               NA  5.665645e-31          NA
#> 133   134               NA               NA  2.352644e-32          NA
#> 134   135               NA               NA  9.332165e-34          NA
#> 135   136               NA               NA  3.538425e-35          NA
#> 136   137               NA               NA  1.283205e-36          NA
#> 137   138               NA               NA  4.453230e-38          NA
#> 138   139               NA               NA  1.479650e-39          NA
#> 139   140               NA               NA  4.709123e-41          NA
#> 140   141               NA               NA  1.436118e-42          NA
#> 141   142               NA               NA  4.198203e-44          NA
#> 142   143               NA               NA  1.176782e-45          NA
#> 143   144               NA               NA  3.163783e-47          NA
#> 144   145               NA               NA  8.160154e-49          NA
#> 145   146               NA               NA  2.019565e-50          NA
#> 146   147               NA               NA  4.796855e-52          NA
#> 147   148               NA               NA  1.093580e-53          NA
#> 148   149               NA               NA  2.393213e-55          NA
#> 149   150               NA               NA  5.027772e-57          NA
#> 150   151               NA               NA  1.014017e-58          NA
#> 151   152               NA               NA  1.963305e-60          NA
#> 152   153               NA               NA  3.649106e-62          NA
#> 153   154               NA               NA  6.510431e-64          NA
#> 154   155               NA               NA  1.114836e-65          NA
#> 155   156               NA               NA  1.832014e-67          NA
#> 156   157               NA               NA  2.888593e-69          NA
#> 157   158               NA               NA  4.369089e-71          NA
#> 158   159               NA               NA  6.337728e-73          NA
#> 159   160               NA               NA  8.814315e-75          NA
#> 160   161               NA               NA  1.174931e-76          NA
#> 161   162               NA               NA  1.500527e-78          NA
#> 162   163               NA               NA  1.835276e-80          NA
#> 163   164               NA               NA  2.148740e-82          NA
#> 164   165               NA               NA  2.406958e-84          NA
#> 165   166               NA               NA  2.578158e-86          NA
#> 166   167               NA               NA  2.638983e-88          NA
#> 167   168               NA               NA  2.579605e-90          NA
#> 168   169               NA               NA  2.406214e-92          NA
#> 169   170               NA               NA  2.140051e-94          NA
#> 170   171               NA               NA  1.813149e-96          NA
#> 171   172               NA               NA  1.461964e-98          NA
#> 172   173               NA               NA 1.120644e-100          NA
#> 173   174               NA               NA 8.156741e-103          NA
#> 174   175               NA               NA 5.630204e-105          NA
#> 175   176               NA               NA 3.680238e-107          NA
#> 176   177               NA               NA 2.274557e-109          NA
#> 177   178               NA               NA 1.326912e-111          NA
#> 178   179               NA               NA 7.292705e-114          NA
#> 179   180               NA               NA 3.768112e-116          NA
#> 180   181               NA               NA 1.826130e-118          NA
#> 181   182               NA               NA 8.278994e-121          NA
#> 182   183               NA               NA 3.500954e-123          NA
#> 183   184               NA               NA 1.376320e-125          NA
#> 184   185               NA               NA 5.011191e-128          NA
#> 185   186               NA               NA 1.682597e-130          NA
#> 186   187               NA               NA 5.184140e-133          NA
#> 187   188               NA               NA 1.457182e-135          NA
#> 188   189               NA               NA 3.711276e-138          NA
#> 189   190               NA               NA 8.494911e-141          NA
#> 190   191               NA               NA 1.730261e-143          NA
#> 191   192               NA               NA 3.097718e-146          NA
#> 192   193               NA               NA 4.799140e-149          NA
#> 193   194               NA               NA 6.303391e-152          NA
#> 194   195               NA               NA 6.824821e-155          NA
#> 195   196               NA               NA 5.848385e-158          NA
#> 196   197               NA               NA 3.719024e-161          NA
#> 197   198               NA               NA 1.560148e-164          NA
#> 198   199               NA               NA 3.238585e-168          NA
#> 
#>  Mean and standard deviation 
#>    Method     mean       sd
#> 1    1SIS 53.81318 46.86916
#> 2    2SIS 45.57633 42.89603
#> 3     FIS 39.79628 37.32272
#> 4 Dorfman 70.35441 46.10214