Description Usage Arguments Value
View source: R/data_processing.R
Given an ihist and an assay of interest, compute the observed LN and FP dates for that assay. Optionally, slower (faster) assays are inspected to see if earlier (later) LN (FP) dates can be deduced (only useful in the case where some tests are not performed at some visits).
1 | compute_result_summary(ihist, assay_name, faster_assays = NULL)
|
ihist |
The individual diagnostic history from which an assay's results must be summarized. |
assay_name |
The name of the assay to summarize. |
faster_assays |
The assays with shorter window periods than this assay that should be checked if a later LN result can be deduced. |
A single row of a data.frame with the columns:
ptid - The participant identifier read from the ihist
assay_name - The name of the assay this row describes. From the assay_name input to the function.
obs_rel_LN - Observed LN date for the assay relative to the overall first positive for the participant.
ded_rel_LN - Deduced LN date (from faster assays) for this assay relative to the overall first positive for the participant.
LN_ded_from - The assay name from which the LN was deduced. Will always be the fastest assay that produced the earliest LN date.
obs_rel_FP - Observed FP date for the assay relative to the overall first positive for the participant.
ded_rel_FP - Deduced FP date (from slower assays) for this assay relative to the overall first positive for the participant.
FP_ded_from - The assay name from which the FP was deduced. Will always be the fastest assay that produced the earliest FP date.
rel_LN - The maximum of the observed and deduced LN dates. This will ensure that the interval during which the assay transitioned from negative to positive is as short as possible by factoring in the structural knowledge we assume about the assays.
rel_FP - The minimun of the observed and deduced FP dates. This will ensure that the interval during which the assay transitioned from negative to positive is as short as possible by factoring in the structural knowledge we assume about the assays.
LN_FP_gap - The width of the interval between which the assay transitioned from negative to positive.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.