This package implements the methods of Fellows et. al. 2022 for the calculation of incidence using recency assays such as LAg-Avidity. Because treated individuals and elite controllers are known to ave high false positivity rates on recency assays, individuals with low viral load or a previous HIV+ diagnosis are screened out. A previous diagnosis can be indicated by either a self-reported previous positive test or through the detection of ARV antibodies.
knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
The package includes example data, which we will be using in this vignette.
library(recent) data("assay_data") head(assay_data[1:7])
recent
: Logical. Did the subject test recent on the assay.hiv
: Logical. Is the subject HIV+.undiagnosed
: Logical. Has the subject never received a positive HIV test.elite_cntr
: Logical. Viral load test <1,000.tslt
: Numeric. Time since last HIV test in months.ever_hiv_test
: Logical. Has the subject never been tested for HIV.weights
: Numeric. Survey Weights.btwt001-btwt206
: Numeric. Jackknife replicate weights.Incidence is calculated using the rita_incidence
function. The frr
and assay_surv
are the reference FRR and reference probability of testing recent by day since seroconversion. Here we use values calculated for the LAg-Avidity assay. The default recency period (tau) is 2 years.
inc <- rita_incidence( recent=assay_data$recent, undiagnosed=assay_data$undiagnosed, low_viral=assay_data$elite_cntr, hiv=assay_data$hiv, weights=assay_data$weights, tslt=assay_data$tslt, ever_hiv_test=assay_data$ever_hiv_test, frr = lag_avidity_frr()[1], assay_surv = lag_avidity_survival(2 * 365) ) knitr::kable(inc)
The function outputs the following values:
incidence
: The incidence.residual_frr
: The false recency rate accounting for the screening process.omega_rs
: The mean duration of recency up to tau accounting for the screening process.P(R|S)
: The proportion of screened in individual who test recent.P(S|H)
: The proportion of HIV+ individuals that are screened in.P(H)
: HIV prevalence.By default the function estimates the time to diagnosis distribution using testing history information among undiagnosed HIV+ cases. If there are few of these, or their reliability is questionable, the HIV- population can be used instead by specifying ``.
inc <- rita_incidence( recent=assay_data$recent, undiagnosed=assay_data$undiagnosed, low_viral=assay_data$elite_cntr, hiv=assay_data$hiv, weights=assay_data$weights, tslt=assay_data$tslt, ever_hiv_test=assay_data$ever_hiv_test, frr = lag_avidity_frr()[1], assay_surv = lag_avidity_survival(2 * 365), test_history_population = "negative" ) knitr::kable(inc)
Calculation of confidence intervals using survey replicate weights is supported.
rep_weights <- dplyr::select(assay_data, dplyr::contains("btwt")) ri <- rita_bootstrap( recent=assay_data$recent, undiagnosed=assay_data$undiagnosed, low_viral=assay_data$elite_cntr, hiv=assay_data$hiv, weights=assay_data$weights, tslt=assay_data$tslt, ever_hiv_test=assay_data$ever_hiv_test, rep_weights = rep_weights, rep_weight_type = "JK1" ) knitr::kable(ri)
Numerous jackknife and bootstrap weight types are supported. See survey::svrrepdesign
for details.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.