This function calculates the probability of accurately estimating variant prevalence given a given a sample size and desired precision in the variant prevalence estimate, and assuming a single, cross-sectional sample of detected infections.

vartrack_prob_prev_xsect(p_v1, n, omega, precision, c_ratio = 1)

Arguments

p_v1

variant prevalence (proportion)

n

sample size

omega

probability of sequencing (or other characterization) success

precision

desired precision in variant prevalence estimate

c_ratio

coefficient of detection ratio, calculated as the ratio of the coefficients of variant 1 to variant 2. Default = 1 (no bias)

Value

scalar of expected sample size

Author

Shirlee Wohl, Elizabeth C. Lee, Bethany L. DiPrete, and Justin Lessler

Examples

vartrack_prob_prev_xsect(p_v1 = 0.1, n = 200, precision = 0.1, omega = 0.8, c_ratio = 1)
#> [1] 0.32671