estSnapshot.Rd
$$ \hat{\lambda} = \frac{N_{rec}/q}{\hat{\mu} N_{neg}} $$ where \(\hat{\mu}\) is an estimate of the mean window period.
estSnapshot(n_r, n_n, n_p, n, mu, mu_var, n_p_test = NULL)
Number of recent positives
Number of negatives
Number of positives
Total number of observations (\(n_n + n_p = n\))
Mean window period (in years, not days)
Variance of the estimator for mean window period. If \(\mu\) is known, input 0.
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 for \(\lambda\).
q
is an adjustment for the number of positives that are given recency tests.
estSnapshot(n_r=2, n_n=50, n_p=10, n=60,
mu=0.36, mu_var=0)
#> $est
#> [1] 0.1111111
#>
#> $var
#> [1] 0.006419753
#>
estSnapshot(n_r=c(2, 3), n_n=c(50, 48), n_p=c(10, 12), n=c(60, 60),
mu=0.36, mu_var=0, n_p_test=c(9, 10))
#> $est
#> [1] 0.1234568 0.2083333
#>
#> $var
#> [1] 0.00775627 0.01464844
#>