get.dorfman.cv.fold.data: Splits Dorfman testing data into crossvalidation data sets.

View source: R/aenetgt.R

get.dorfman.cv.fold.dataR Documentation

Splits Dorfman testing data into crossvalidation data sets.

Description

Splits Dorfman testing data into crossvalidation data sets.

Usage

get.dorfman.cv.fold.data(X, Y, Z, K)

Arguments

X

Design matrix with first column a column of 1s.

Y

Group testing output from one of the functions individual.assay.gen, masterpool.assay.gen, dorfman.assay.gen, or array.assay.gen.

Z

Group testing output from one of the functions individual.assay.gen, masterpool.assay.gen, dorfman.assay.gen, or array.assay.gen.

K

The number of crossvalidation folds.

Value

List of length K of the crossvalidation training and testing data sets.

Examples

# generate individual covariate values and disease statuses
N <- 160
data <- model1(N)
X <- data$X
Y.true <- data$Yi
Se <- c(.92,.95) # set master pool and individual assay sensitivity
Sp <- c(.97,.98) # set master pool and individual assay specificity
cj <- 4 # set size of master pools
# subject individuals to Dorfman testing
assay.data <- dorfman.assay.gen(Y.true,Se,Sp,cj)
Z <- assay.data$Z
Y <- assay.data$Y
dorfman.cv.fold.data <- get.dorfman.cv.fold.data(X,Y,Z,K=5)

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