calculate_likelihood_negative_tests {smidm}R Documentation

Overall likelihood

Description

Calculates vector of probabilities that zero positive tests are observed given different numbers of infected.

Usage

calculate_likelihood_negative_tests(
  test_infos,
  test_types,
  negative_persons,
  subgroup_size,
  info
)

Arguments

test_infos

Matrix with column number of test days and a column for each test with the testday relative to event date, the rows are the groups.

test_types

Matrix with test day (columns) of each group (rows) and whe informations about test types.

negative_persons

Number of people without the infectious persons.

subgroup_size

Array with the number of persons per test group.

info

Dataframe, this is a placeholder

Value

Vector of probabilities calculated.

Examples

test_infos <- matrix(nrow = 2, ncol = 3)
test_infos[1,] <- c(1, 2, NA)
test_infos[2,] <- c(2, 4, 6)

test_types <- matrix(nrow = 2, ncol = 2)
test_types[1,] <- c("PCR", NA)
test_types[2,] <- c("PCR", "Antigen")

calculate_likelihood_negative_tests(test_infos = test_infos,
                                    test_types = test_types,
                                    negative_persons = 23,
                                    subgroup_size = c(3, 5))


[Package smidm version 1.0 Index]