R/vartrack_samplesize_prev.R
vartrack_samplesize_prev.Rd
This function calculates the sample size needed for estimating variant prevalence given a desired confidence and desired precision in the variant prevalence estimate. Currently, only cross-sectional sampling is supported.
vartrack_samplesize_prev(
p_v1,
prob,
precision,
omega,
c_ratio = 1,
sampling_freq
)
variant prevalence (proportion)
desired confidence in variant prevalence estimate
desired precision in variant prevalence estimate
probability of sequencing (or other characterization) success
coefficient of detection ratio, calculated as the ratio of the coefficients of variant 1 to variant 2. Default = 1 (no bias)
the sampling frequency (must be 'xsect' in current implementation)
scalar of sample size
Other variant prevalence estimation functions:
vartrack_prob_prev_xsect()
,
vartrack_prob_prev()
,
vartrack_samplesize_prev_xsect()
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_cont()
,
vartrack_samplesize_detect_xsect()
,
vartrack_samplesize_detect()
,
vartrack_samplesize_prev_xsect()
vartrack_samplesize_prev(p_v1 = 0.1, prob = 0.95, precision = 0.25,
omega = 0.8, c_ratio = 1, sampling_freq = 'xsect')
#> Calculating sample size for variant prevalence estimation assuming single cross-sectional sample
#> [1] 691.4626