R/vartrack_prob_prev.R
vartrack_prob_prev.Rd
This function calculates the probability of accurately estimating variant prevalence given a sample size and desired precision in the variant prevalence estimate. Currently, only cross-sectional sampling is supported.
vartrack_prob_prev(p_v1, n, omega, precision, c_ratio = 1, sampling_freq)
variant prevalence (proportion)
sample size
probability of sequencing (or other characterization) success
desired precision in variant prevalence estimate
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 either 'xsect' in current implementation)
scalar of expected sample size
Other variant prevalence estimation functions:
vartrack_prob_prev_xsect()
,
vartrack_samplesize_prev_xsect()
,
vartrack_samplesize_prev()
Other variant tracking functions:
vartrack_cod_ratio()
,
vartrack_prob_detect_cont()
,
vartrack_prob_detect_xsect()
,
vartrack_prob_detect()
,
vartrack_prob_prev_xsect()
,
vartrack_samplesize_detect_cont()
,
vartrack_samplesize_detect_xsect()
,
vartrack_samplesize_detect()
,
vartrack_samplesize_prev_xsect()
,
vartrack_samplesize_prev()
vartrack_prob_prev(p_v1 = 0.1, n = 200, omega = 0.8, precision = 0.1,
c_ratio = 1, sampling_freq = 'xsect')
#> Calculating confidence in variant estimate assuming single cross-sectional sample
#> [1] 0.32671