This function calculates the sample size needed for detecting the presence of a variant given a desired probability of detection and assuming a single, cross-sectional sample of detected infections.

vartrack_samplesize_detect_xsect(p_v1, prob, omega, c_ratio = 1)

Arguments

p_v1

variant prevalence (proportion)

prob

desired probability of detection

omega

probability of sequencing (or other characterization) success

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_samplesize_detect_xsect(p_v1 = 0.1, prob = 0.95, omega = 0.8, c_ratio = 1)
#> [1] 35.54145