vartrack_samplesize_detect_cont {phylosamp} | R Documentation |
Calculate sample size needed for variant detection assuming periodic sampling
Description
This function calculates the sample size needed for detecting the presence of a variant given a desired probability of detection and either a desired maximum time until detection or a desired prevalence by which to detect the variant by. It assumes a periodic sampling strategy, where samples are collected at regular intervals (time steps).
Usage
vartrack_samplesize_detect_cont(
prob,
t = NA,
p_v1 = NA,
omega,
p0_v1,
r_v1,
c_ratio = 1
)
Arguments
prob |
desired probability of detection |
t |
time step number (e.g., days) at which variant should be detected by. Default = NA (either |
p_v1 |
the desired prevalence to detect a variant by. Default = NA (either |
omega |
probability of sequencing (or other characterization) success |
p0_v1 |
initial variant prevalence (# introductions / infected population size) |
r_v1 |
logistic growth rate |
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(s)
Shirlee Wohl, Elizabeth C. Lee, Bethany L. DiPrete, and Justin Lessler
See Also
Other variant detection functions:
vartrack_prob_detect_cont()
,
vartrack_prob_detect_xsect()
,
vartrack_prob_detect()
,
vartrack_samplesize_detect_xsect()
,
vartrack_samplesize_detect()
Other variant tracking functions:
vartrack_cod_ratio()
,
vartrack_prob_detect_cont()
,
vartrack_prob_detect_xsect()
,
vartrack_prob_detect()
,
vartrack_prob_prev_xsect()
,
vartrack_prob_prev()
,
vartrack_samplesize_detect_xsect()
,
vartrack_samplesize_detect()
,
vartrack_samplesize_prev_xsect()
,
vartrack_samplesize_prev()
Examples
vartrack_samplesize_detect_cont(prob = 0.95, t = 30, omega = 0.8,
p0_v1 = 1/10000, r_v1 = 0.1, c_ratio = 1)