estAdjusted.Rd
$$ \hat{\lambda} = \frac{N_{rec}/q - N_{pos} \hat{\beta}_{T^*}}{N_{neg} (\hat{\Omega}_{T^*} - \hat{\beta}_{T^*} T^*)} $$ where \(\hat{\Omega}_{T^*}\) is an estimate of the mean duration of recent infection (MDRI), \(\hat{\beta}_{T^*}\) is an estimate of the false recency rate, and \(T^*\) is the time cutoff for being a recent infected or not.
estAdjusted(
n_r,
n_n,
n_p,
n,
omega,
omega_var,
beta,
beta_var,
big_T,
n_p_test = NULL,
q_var = FALSE
)
Number of recent positives
Number of negatives
Number of positives
Total number of observations (\(n_n + n_p = n\))
Mean duration of recent infection (MDRI) (in years, not days)
Variance of the estimator for MDRI (or 0 if MDRI known)
False recency rate (FRR)
Variance of the estimator for FRR (or 0 if FRR known)
The \(T^*\) in the equation above
Optional number of positives that were given a recency test. If left NULL
,
assumed to be equal to n_p
.
Returns a list of the estimate and the variance.
q
is an adjustment for the number of positives that are given recency tests.
estAdjusted(n_r=2, n_n=50, n_p=10, n=60,
omega=0.36, omega_var=0, beta=0.02, beta_var=0, big_T=2, n_p_test=9)
#> $est
#> [1] 0.1263889
#>
#> $var
#> [1] 0.009805368
#>
estAdjusted(n_r=c(2, 3), n_n=c(50, 48), n_p=c(10, 12), n=c(60, 60),
omega=0.36, omega_var=0, beta=0.02, beta_var=0, big_T=2)
#> $est
#> [1] 0.1125000 0.1796875
#>
#> $var
#> [1] 0.00776875 0.01290003
#>