foo_atr: Intermediate function needed by MP, MiniPooling with...

Description Usage Arguments Value Examples

Description

This function calculates the ART needed by MPA for a range of pool sizes (from 2 to a pool size specified).

Usage

1
foo_atr(v, N = length(v), max_K = 5, cutoff = 1000, quietly = TRUE)

Arguments

v

Numeric vector of the observations for calculating ecdf. For quantitative pooling strategies, only CDF on the support of v < cutoff is needed; so v can be the fraction of observations less than the cutoff and use N to pass the number of all observations.

N

The number (vector length) of the observations. By default, N = length(v).

max_K

Maximum pool size that is considered.

cutoff

Cutoff value of quantitative assay that defines test positivity. By default, cutoff = max(v) which calculates the CDF for the entire support of v.

quietly

Logical value; whether print the results to screen or not.

Value

The function returns a matrix of two columns: The pool size from 1:max_K, the convol_cdf(? question about how to describe this value), and the Average Tests Required by MPA (MPA_ATR) given that pool size

Examples

1
2
foo_atr(c(200, 1500, 1900, 800, 950), max_K = 9, cutoff = 2000, quietly = TRUE)
foo_atr(c(200, 1500, 1900, 800, 950), max_K = 6, cutoff = 1000, quietly = TRUE)

whitneysu/QuantitativePooledTesting documentation built on Feb. 2, 2021, 12:46 p.m.