Probability of transmission

Functions to calculate the transmission probability in a sample

translink_fdr()

Calculate false discovery rate of identifying transmission pairs in a sample

translink_tdr()

Calculate true discovery rate of identifying transmission pairs

translink_prob_transmit()

Calculate probability of transmission

translink_prob_transmit_mtml()

Calculate probability of transmission assuming multiple-transmission and multiple-linkage

translink_prob_transmit_mtsl()

Calculate probability of transmission assuming multiple-transmission and single-linkage

translink_prob_transmit_stsl()

Calculate probability of transmission assuming single-transmission and single-linkage

Observed transmission pairs

Functions to calculate the expected number of observed transmission pairs in a sample

translink_expected_links_obs()

Calculate expected number of transmission links in a sample

translink_expected_links_obs_mtml()

Calculate expected number of observed pairs assuming multiple-transmission and multiple-linkage

translink_expected_links_obs_mtsl()

Calculate expected number of observed pairs assuming multiple-transmission and single-linkage

translink_expected_links_obs_stsl()

Calculate expected number of observed pairs assuming single-transmission and single-linkage

True transmission pairs

Functions to calculate the expected number true transmission pairs in a sample

translink_expected_links_true()

Calculate expected number of true transmission pairs

translink_expected_links_true_mtml()

Calculate expected number of true transmission pairs assuming multiple-transmission and multiple-linkage

translink_expected_links_true_mtsl()

Calculate expected number of true transmission pairs assuming multiple-transmission and single-linkage

translink_expected_links_true_stsl()

Calculate expected number of true transmission pairs assuming single-transmission and single-linkage

Sample size calculations for transmission linkage

Functions to calculate the sample size needed to identify transmission pairs given a specified false discovery rate

translink_samplesize()

Calculate sample size needed to identify true transmission links

Genetic distance as a linkage criteria

Functions and data to calculate the sensitivity and specificity of genetic distance measures

gendist_distribution()

Calculate genetic distance distribution

gendist_roc_format()

Make ROC curve from sensitivity and specificity

gendist_sensspec_cutoff()

Calculate sensitivity and specificity of a genetic distance cutoff

optim_roc_threshold()

Find optimal ROC threshold

genDistSim

Simulations of the genetic distance distribution

gen_dists()

Calculate genetic distance distribution

Estimating variant frequency

Functions to esimtate the pathogen variant frequency in a population

varfreq_cdf_logistic()

Calculate cumulative observed variant prevalence at time t given logistic growth

varfreq_expected_mbias()

Calculate multiplicative bias (observed / actual) in variant prevalence

varfreq_freq_logistic()

Calculate observed variant prevalence at time t given logistic growth

varfreq_obs_freq()

Calculate observed variant prevalence

The coefficient of detection

Functions to calculate coefficient of detection ratio between two pathogen variants

vartrack_cod_ratio()

Calculate the coefficient of detection ratio for two variants

Probability of variant detection

Functions to estimate the probability of detecting a pathogen variant given a sample size

vartrack_prob_detect()

Calculate the probability of detecting a variant given a sample size

vartrack_prob_detect_cont()

Calculate probability of detecting a variant given a per-timestep sample size assuming periodic sampling

vartrack_prob_detect_xsect()

Calculate probability of detecting a variant assuming cross-sectional sampling

Sample size for variant detection

Functions to calculate the sample size needed to detect a pathogen variant

vartrack_samplesize_detect()

Calculate sample size needed for variant detection given a desired probability of detection

vartrack_samplesize_detect_cont()

Calculate sample size needed for variant detection assuming periodic sampling

vartrack_samplesize_detect_xsect()

Calculate sample size needed for variant detection assuming cross-sectional sampling

Confidence in variant prevalence estimate

Functions to estimate the confidence in a variant prevalence estimate given a sample size

vartrack_prob_prev()

Calculate confidence in a variant estimate given a sample size

vartrack_prob_prev_xsect()

Calculate confidence in a variant estimate assuming cross-sectional sampling

Sample size for variant prevalence estimation

Functions to calculate the sample size needed to estimate the prevalence of a variant in a population

vartrack_samplesize_prev()

Calculate sample size needed for estimating variant prevalence given a desired confidence

vartrack_samplesize_prev_xsect()

Calculate sample size needed for variant prevalence estimation under cross-sectional sampling

Sample size for detecting differential transmission

Functions to calculate the sample size needed to detect differential transmission between groups

relR_samplesize()

Calculate sample size needed to detect differential transmission

relR_samplesize_basic()

Calculate simple derived sample size for detecting differential transmission

relR_samplesize_ci()

Calculate sample size for detecting differential transmission with uncertainty bounds

relR_samplesize_linkerr()

Calculate sample size for detecting differential transmission correcting for sensitivity and specificity

relR_samplesize_opterr()

Function to calculate the error in estimated sample size for use in optimize function

relR_samplesize_simsolve()

Calculate optimized sample size for detecting differential transmission

relR_samplesize_solve()

Calculate optimal sample size for detecting differential transmission with imperfect specificity

Power for detecting differential transmission

Functions to calculate the power given parameters used to detect differential transmission between groups

relR_power()

Calculate power for detecting differential transmission given a sample size

relR_power_simulated()

Simulate power for detecting differential transmission