EYgibbs: Computes approximate conditional expectations of individual...

View source: R/RcppExports.R

EYgibbsR Documentation

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

Description

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

Usage

EYgibbs(N, p, Y, Z, se, sp, na, GI)

Arguments

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.

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 approximate conditional expectations via Gibbs sampling 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 <- EYapprox(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.