Introduction

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 = "#>"
)

Data

The package includes example data, which we will be using in this vignette.

library(recent)
data("assay_data")
head(assay_data[1:7])
  1. recent: Logical. Did the subject test recent on the assay.
  2. hiv: Logical. Is the subject HIV+.
  3. undiagnosed: Logical. Has the subject never received a positive HIV test.
  4. elite_cntr: Logical. Viral load test <1,000.
  5. tslt: Numeric. Time since last HIV test in months.
  6. ever_hiv_test: Logical. Has the subject never been tested for HIV.
  7. weights: Numeric. Survey Weights.
  8. btwt001-btwt206: Numeric. Jackknife replicate weights.

Incidence Estimation

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:

  1. incidence: The incidence.
  2. residual_frr: The false recency rate accounting for the screening process.
  3. omega_rs: The mean duration of recency up to tau accounting for the screening process.
  4. P(R|S) : The proportion of screened in individual who test recent.
  5. P(S|H) : The proportion of HIV+ individuals that are screened in.
  6. 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)

Bootstrap Confidence Intervals

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.



fellstat/recent documentation built on April 12, 2022, 3:10 p.m.