rita_bootstrap | R Documentation |
Assay Based Incidence Estimation With Survey Bootstrap Intervals
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, ... )
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. |
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.
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" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.