masterpool.assay.gen: Generates master pool testing data.

View source: R/aenetgt.R

masterpool.assay.genR Documentation

Generates master pool testing data.

Description

Generates master pool testing data.

Usage

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

Arguments

Y.true

The true disease statuses of the individuals.

Se

The master pool testing sensitivity.

Sp

The master pool testing specificity.

cj

The size of the master pools (Note: The number of individuals length(Y.true) should be evenly divisible by 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 Initial pool testing 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

# generate individual covariate values and disease statuses
N <- 100
data <- model1(N)
X <- data$X
Y.true <- data$Yi
Se <- .95 # set master pool assay sensitivity
Sp <- .97 # set master poot assay specificity
cj <- 4 # set size of master pools
# subject individuals to master pool testing
assay.data <- masterpool.assay.gen(Y.true,Se,Sp,cj)

gregorkb/aenetgt documentation built on Oct. 12, 2022, 11:51 a.m.