Accuracy {binGroup2}R Documentation

Extract the accuracy measures from group testing results

Description

Extract the accuracy measures from objects of class "opchar" returned by operatingCharacteristics1 (opChar1) or operatingCharacteristics2 (opChar2).

Usage

Accuracy(object, individual = TRUE, ...)

Arguments

object

An object of class "opChar", from which the accuracy measures are to be extracted.

individual

A logical argument that determines whether the accuracy measures for each individual (individual=TRUE) are to be included.

...

Additional arguments to be passed to Accuracy (e.g., digits to be passed to round or signif for appropriate rounding).

Details

The Accuracy function gives the individual accuracy measures for each individual in object and the overall accuracy measures for the algorithm. If individual=TRUE, individual accuracy measures are provided for each individual specified in the a argument of the call to operatingCharacteristics1 (opChar1) or operatingCharacteristics2 (opChar2).

Accuracy measures included are the pooling sensitivity, pooling specificity, pooling positive predictive value, and pooling negative predictive value. The overall accuracy measures displayed are weighted averages of the corresponding individual accuracy measures for all individuals in the algorithm. Expressions for these averages are provided in the Supplementary Material for Hitt et al. (2019). For more information, see the Details' section for the operatingCharacteristics1 (opChar1) or operatingCharacteristics2 (opChar2) function.

The rows in the matrices of individual accuracy measures correspond to each unique set of accuracy measures in the algorithm. Individuals with the same set of accuracy measures are displayed together in a single row of the matrix. The columns correspond to the pooling sensitivity, pooling specificity, pooling positive predictive value, pooling negative predictive value, and the indices for the individuals in each row of the matrix. Individual accuracy measures are provided only if individual=TRUE.

Value

A list containing:

Individual

matrix detailing the accuracy measures for each individual from object (for objects returned by opChar1).

Disease 1 Individual

matrix detailing the accuracy measures pertaining to disease 1 for each individual from object (for objects returned by opChar2).

Disease 2 Individual

matrix detailing the accuracy measures pertaining to disease 2 for each individual from object (for objects returned by opChar2).

Overall

matrix detailing the overall accuracy measures for the algorithm from object.

Author(s)

Brianna D. Hitt

Examples

config.mat <- matrix(data = c(rep(1, 10), 1:10),
                     nrow = 2, ncol = 10, byrow = TRUE)
res1 <- opChar1(algorithm = "D2", p = 0.05, Se = 0.99, Sp = 0.99,
        hier.config = config.mat)
Accuracy(res1, individual = FALSE)
Accuracy(res1, individual = TRUE)

res2 <- opChar2(algorithm = "A2M",
                p.vec = c(0.92, 0.05, 0.02, 0.01),
                Se = rep(0.95, 2), Sp = rep(0.99, 2),
                rowcol.sz = 8)
Accuracy(res2)

[Package binGroup2 version 1.3.1 Index]