calculate_likelihood_negative_tests_k: Likelihood K

View source: R/utility_functions.R

calculate_likelihood_negative_tests_kR Documentation

Likelihood K

Description

Calculates the probability that zero positive tests are observed given K of the group are infected.

Usage

calculate_likelihood_negative_tests_k(
  infected_group_size,
  information_data,
  test_infos,
  test_types,
  info,
  combination_infected,
  number_group_peoples,
  number_subgroups
)

Arguments

infected_group_size

Number of infected Persons in the group.

information_data

Matrix with columns person ID, tested (T/F), result(F/NA), testNumbers, groupNumber

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.

info

Dataframe with the day specific information about sensitivity and specificity.

combination_infected

Matrix of all possible combinations how K infected are distributed among subgroups.

number_group_peoples

Vector with the number of people per group.

number_subgroups

Number of subgroups including group of untested (if existent).

Value

The probability.


smidm documentation built on Aug. 27, 2022, 9:06 a.m.