array.assay.gen: Generates array testing data.

View source: R/misc.R

array.assay.genR Documentation

Generates array testing data.

Description

Generates array testing data.

Usage

array.assay.gen(Y.true, Se, Sp, cj)

Arguments

Y.true

The true disease statuses of the individuals.

Se

A vector of testing sensitivities, where the first element is the testing sensitivity for the row/column pools and the second entry is the test sensitivity for individual testing.

Sp

A vector of testing specificities, where the first element is the testing specificity for the row/column pools and the second entry is the test specificity for individual testing.

cj

Row and column pool sizes to be used (Note: The number of individuals should be evenly divisible by cj*cj. This is only for decoding purposes; i.e., the regression methods do not require this condition)

Value

A list containing objects Z and Y.

This function simulates array decoding and stores the testing responses in accordance to the data structure required to fit the group testing regression model presented in Gregory et al. (2018+). For the specifics of this structure see McMahan et al. (2017).

Examples

Y.true <- rbinom(100,1,p=.05)
assay.data <- array.assay.gen(Y.true,Se=c(.95,.92),Sp=c(.97,.98),cj=5)

gregorkb/semipadd2pop documentation built on Oct. 2, 2022, 1:37 p.m.