EYexact: Computes conditional expectations of individual disease...

View source: R/RcppExports.R

EYexactR Documentation

Computes conditional expectations of individual disease statuses for individual, master pool, or Dorfman testing

Description

Computes conditional expectations of individual disease statuses for individual, master pool, or Dorfman testing

Usage

EYexact(Z, Y, X, b, Se, Sp)

Arguments

Z

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

Y

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

X

Design matrix with first column a column of 1s.

b

Parameter values at which to compute the conditional expectations.

Se

A vector of testing sensitivities of length max(Z[,3]).

Sp

A vector of testing specificities of length max(Z[,3]).

Value

The vector of conditional expectations.

This function computes the conditional expectations of each individual disease status, conditional on the observed assay data and the diseasestatuses of all other individuals.

Examples

grouplassogt2pop_data <- get_grouplassogt2pop_data( n1 = 400, n2 = 600)
  
EY <- EYexact(Z = grouplassogt2pop_data$Z1,
              Y = grouplassogt2pop_data$Y1,
              X = grouplassogt2pop_data$X1,
              b = rep(1,ncol(grouplassogt2pop_data$X1)),
              Se = grouplassogt2pop_data$Se1,
              Sp = grouplassogt2pop_data$Sp1)

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