sim_dx_results: Simulates a visit's diagnostic results

Description Usage Arguments Details

View source: R/sims.R

Description

Given the time since infection, this function will draw from the window period distributions of the specified assays to obtain a set of diagnostic test result.

Usage

1
sim_dx_results(tsi, list_of_assays, skip_order_check = TRUE)

Arguments

tsi

The time since infection in days. tsi = 0 is the day of infection.

list_of_assays

ORDERED list of assays for which test results should be produced. They must be ordered with the fastest assay first (fastest = assay with the shortest window period)

skip_order_check

When set to TRUE (the default), it is assumed that the order of the list_of_assays is correct. It is EXTREMELY important that this order is correct. This option defaults to TRUE since this step is very slow, so run it the first time only to check that your list is ordered correctly (by setting skip_order_check = FALSE).

Details

The first negative test result will stop the procedure since then it is known that all other assays will also produce negative results.

A key shortcoming of this function is that successive calls are independent. Thus if you want to construct a diagnostic history this function is inappropriate. See the sim-dx-history vignette.


philliplab/tsic documentation built on June 26, 2020, 7:55 p.m.