# Sample Size Calculations for Molecular and Phylogenetic Studies

## Documentation for package ‘phylosamp’ version 1.0.1

- DESCRIPTION file
- User guides, package vignettes and other documentation
- Package NEWS
- Package README

## Help Pages

exp_links | Calculate expected number of links in a sample
falsediscoveryrate | Calculate false discovery rate of a sample
genDistSim | Simulations of the genetic distance distribution
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
gen_dists | Calculate genetic distance distribution
get_optim_roc | Find optimal ROC threshold
obs_pairs_mtml | Expected number of observed pairs assuming multiple-transmission and multiple-linkage
obs_pairs_mtsl | Expected number of observed pairs assuming multiple-transmission and single-linkage
obs_pairs_stsl | Expected number of observed pairs assuming single-transmission and single-linkage
optim_roc_threshold | Find optimal ROC threshold
prob_trans_mtml | Probability of transmission assuming multiple-transmission and multiple-linkage
prob_trans_mtsl | Probability of transmission assuming multiple-transmission and single-linkage
prob_trans_stsl | Probability of transmission assuming single-transmission and single-linkage
relR_power | Calculate power for detecting differential transmission given a sample size
relR_power_simulated | Simulate power for detecting differential transmission
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
samplesize | Calculate sample size
sens_spec_calc | Calculate sensitivity and specificity
sens_spec_roc | Make ROC from sensitivity and specificity
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
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
translink_fdr | Calculate false discovery rate of identifying transmission pairs in a sample
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
translink_samplesize | Calculate sample size needed to identify true transmission links
translink_tdr | Calculate true discovery rate of identifying transmission pairs
truediscoveryrate | Calculate true discovery rate of a sample
true_pairs | Calculate expected number of true transmission pairs
true_pairs_mtml | Expected number of true transmission pairs assuming multiple-transmission and multiple-linkage
true_pairs_mtsl | Expected number of true transmission pairs assuming multiple-transmission and single-linkage
true_pairs_stsl | Expected number of true transmission pairs assuming single-transmission and single-linkage
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
vartrack_cod_ratio | Calculate the coefficient of detection ratio for two variants
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
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
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
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