Skip to contents

Assay Based Incidence Estimation With Survey Bootstrap Intervals

Usage

rita_bootstrap(
  recent,
  undiagnosed,
  low_viral,
  hiv,
  tslt,
  ever_hiv_test,
  weights,
  rep_weights = NULL,
  rep_weight_type = c("BRR", "Fay", "JK1", "JK2", "JKn", "bootstrap", "other"),
  combined_weights = TRUE,
  tau = 2,
  frr = lag_avidity_frr()[1],
  test_history_population = c("undiagnosed", "negative"),
  assay_surv = lag_avidity_survival(tau * 365),
  diag_surv = NULL,
  treated = NULL,
  treat_surv = NULL,
  conf_level = 0.95,
  show_progress = TRUE,
  ...
)

Arguments

recent

Logical. Tests recent on assay.

undiagnosed

Logical. No previous diagnosis.

low_viral

Logical. Has low viral load (< 1000).

hiv

Logical. Is HIV positive.

tslt

Time since last HIV test (days).

ever_hiv_test

Subject has been tested for HIV in the past.

weights

Survey weights.

rep_weights

A data.frame of replicate weights. See survey::svrrepdesign

rep_weight_type

The type of resampling weights. See svrepdesign.

combined_weights

TRUE if the rep_weights already include the sampling weights. This is usually the case.

tau

long term cut-off (years).

frr

False recency rate among treatment naive non-elite controller non-AIDS individuals.

test_history_population

If undiagnosed, the testing histories of undiagnosed HIV+ people are used. If negative, the HIV- population is used.

assay_surv

Survival function vector for assay among treatment naive non-elite controller non-AIDS individuals.

diag_surv

time to diagnosis survival function vector.

treated

A logical vector indicating a subject is on treatment. Only needed in the case of the use of RITA2 screening.

treat_surv

Probability an individual diagnosed i days ago is not on treatment.

conf_level

confidence level for bootstrap interval.

show_progress

If TRUE, prints bootstrap progress. This may also be a callback function taking one parameter equal to the index of the current replicate.

...

additional parameters to svrepdesign.

Value

A data.frame with columns for the estimate, standard error, lower confidence bound and upper confidence bound. Rows are defined by: 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.

Examples

data("assay_data")
rep_weights <-  dplyr::select(assay_data, dplyr::contains("btwt"))
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"
)
#> Warning: scale (n-1)/n not provided: guessing n=number of replicates
#>                  estimate    std_error   lower_bound upper_bound
#> incidence    0.0151573230 0.0110181526 -0.0064378594  0.03675251
#> residual_frr 0.0008826826 0.0001937011  0.0005030355  0.00126233
#> omega_rs     0.2921342013 0.0193668352  0.2541759019  0.33009250
#> omega_s      1.0931364222 0.1296151234  0.8390954485  1.34717740
#> P(R|S)       0.0728330452 0.0471440518 -0.0195675985  0.16523369
#> P(S|H)       0.1953130107 0.0255741415  0.1451886144  0.24543741
#> P(H)         0.2480427494 0.0146154193  0.2193970539  0.27668844