sens_spec_calc {phylosamp}R Documentation

Calculate sensitivity and specificity

Description

[Deprecated] Function to calculate the sensitivity and specificity of a genetic distance cutoff given an underlying mutation rate and mean number of generations between cases

Usage

sens_spec_calc(
  cutoff,
  mut_rate,
  mean_gens_pdf,
  max_link_gens = 1,
  max_gens = NULL,
  max_dist = NULL
)

Arguments

cutoff

the maximum genetic distance at which to consider cases linked

mut_rate

mean number of mutations per generation, assumed to be Poisson distributed

mean_gens_pdf

the density distribution of the mean number of generations between cases; the index of this vector is assumed to be the discrete distance between cases

max_link_gens

the maximum generations of separation for linked pairs

max_gens

the maximum number of generations to consider, if NULL (default) value set to the highest number of generations in mean_gens_pdf with a non-zero probability

max_dist

the maximum distance to calculate, if NULL (default) value set to max_gens * 99.9th percentile of mut_rate Poisson distribution

Value

a data frame with the sensitivity and specificity for a particular genetic distance cutoff

Author(s)

Shirlee Wohl and Justin Lessler

See Also

Other mutrate_functions: gen_dists(), get_optim_roc(), sens_spec_roc()

Examples

# calculate the sensitivity and specificity for a specific genetic distance threshold of 2 mutations
sens_spec_calc(cutoff=2,
               mut_rate=1,
               mean_gens_pdf=c(0.02,0.08,0.15,0.75),
               max_link_gens=1)

# calculate the sensitivity and specificity for a a range of genetic distance thresholds
sens_spec_calc(cutoff=1:10,
               mut_rate=1,
               mean_gens_pdf=c(0.02,0.08,0.15,0.75),
               max_link_gens=1)


[Package phylosamp version 1.0.1 Index]