inccounts {inctools} | R Documentation |
Incidence and incidence difference statistics from trinomial counts of HIV and recency
Description
Incidence and incidence difference statistics from trinomial counts of HIV and recency
Usage
inccounts(N, N_H, N_testR, N_R, DE_H = 1, DE_R = 1, BS_Count = 10000,
Boot = FALSE, alpha = 0.05, BMest = "same.test", MDRI, RSE_MDRI,
FRR, RSE_FRR, BigT = 730, Covar_HR = 0)
Arguments
N |
Counts of total survey sample size(s) (vector/integer). |
N_H |
Number of HIV positive found in survey(s) (vector/integer). |
N_testR |
Number tested for recency in survey(s) (vector/integer). |
N_R |
Number of recent cases in survey(s) (vector/integer). |
DE_H |
Design effect of HIV prevalence test (vector/numeric), greater than or equal to 1. If multiple surveys are entered but only one design effect is specified, function assumes entered design effect is identical for both surveys. |
DE_R |
Design effect of recency test (vector/numeric), greater than or equal to 1. If multiple surveys are entered but only one design effect is specified, function assumes entered design effect is identical for both surveys. |
BS_Count |
Specifies number of bootstrap samples for bootstrapped confidence intervals of incidence. |
Boot |
True/False variable indicating whether variance of point estimates is to be calculated by Empirical Bootstrapping (TRUE) or Delta Method (FALSE), the default setting. |
alpha |
test rejection threshold. |
BMest |
Biomarker estimation by one the 3 options 'same.test'(=default), 'FRR.indep', 'MDRI.FRR.indep' (string). |
MDRI |
mean duration of recent infection [days] (vector/integer). |
RSE_MDRI |
Relative standard error of MDRI [days] (vector/integer). |
FRR |
False recent rate (vector/integer). |
RSE_FRR |
Relative standard error of FRR (vector/integer). |
BigT |
Cut point in days of recency used in biomarker assay to test recency in a given prevalence survey. |
Covar_HR |
Covariance of probability of being postive and being categorized recent from survey (or as a vector for multiple surveys). |
Details
Implements assay-based incidence estimation through cross-sectional prevalence and recency of infection tests as described by Kassanjee, et al. 'A new general biomarker-based incidence estimator,' Epidemiology (2012). Function parameters must be specified to include assay test characteristics and survey results as proportions. Confidence intervals are computed via Delta method approximation, except when Boot=TRUE is specified, in which case confidence intervals are generated by empirical bootstrap resampling. Inputs must be in appropriate ranges for appropriate units. Extreme input values may make calculation impossible, and if entered will elicit error notices. The package contains long form documentation in the form of vignettes that cover the use of the main fucntions. Use browseVignettes(package="inctools") to access them.
Value
Incidence estimate, annual risk of infection, confidence interval, relative standard error of estimate and of assay characteristics MDRI and FRR. If multiple surveys are entered, function returns said results, as well as estimates of incidence differences, confidence intervals of differences, difference relative standard errors, and p-values testing the hypothesis that the difference in incidence measures are zero. Theoretical relative standard error of incidence and incidence difference at infinite sample size is returned only if Boot = FALSE, as that calculation relies on the asymptotic behavior of components of the Delta method approximation, and is not calculable from bootstrapped values.
Examples
inccounts(N = c(5000) ,N_H = 1000, N_testR = 1000, N_R = 70,
Boot = FALSE, BMest = 'MDRI.FRR.indep', MDRI = 200, RSE_MDRI = 0.05,
FRR = 0.01, RSE_FRR = 0.2, BigT = 730)
inccounts(N = c(4000,4000,4050) ,N_H = c(1010,1000,900),
N_testR = c(1000,1000,880), N_R = c(60,70,50), Boot = TRUE,
BMest = 'same.test', MDRI = 210, RSE_MDRI = 0.05, FRR = 0.005,
RSE_FRR = 0.19, BigT = 700)
inccounts(N = c(4000,4000) ,N_H = c(1050,1090),
N_testR = c(1000,1000), N_R = c(60,67), Boot = FALSE, BMest = 'FRR.indep',
MDRI = 220, RSE_MDRI = 0.05, FRR = c(0.005,0.005), RSE_FRR = 0.19,
BigT = 610)