$$ \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
)

Arguments

n_r

Number of recent positives

n_n

Number of negatives

n_p

Number of positives

n

Total number of observations (\(n_n + n_p = n\))

omega

Mean duration of recent infection (MDRI) (in years, not days)

omega_var

Variance of the estimator for MDRI (or 0 if MDRI known)

beta

False recency rate (FRR)

beta_var

Variance of the estimator for FRR (or 0 if FRR known)

big_T

The \(T^*\) in the equation above

n_p_test

Optional number of positives that were given a recency test. If left NULL, assumed to be equal to n_p.

Value

Returns a list of the estimate and the variance.

Details

q is an adjustment for the number of positives that are given recency tests.

Examples

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
#>