individual.assay.gen: Generates individual testing data.

View source: R/aenetgt.R

individual.assay.genR Documentation

Generates individual testing data.

Description

Generates individual testing data.

Usage

individual.assay.gen(Y.true, Se, Sp, cj = 1)

Arguments

Y.true

The true disease statuses of the individuals.

Se

The testing sensitivity used for individual testing.

Sp

The testing specificity used for individual testing.

cj

This is an extraneous argument and is here only in order that all four assay.gen functions take the same arguments. Default is cj=1 and an error will be returns if cj!=1.

Value

a list containing objects Z and Y.

This function simulates individual level 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 assay sensitivity
Sp <- .97 # set assay specificity
# subject individuals to individual testing
assay.data <- individual.assay.gen(Y.true,Se,Sp,cj=1)

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