gdistPair1: Genetic distance for data with genotyping errors

Description Usage Arguments Value

View source: R/unfazeD.R

Description

Distance when estimated COI is less than |Ux|: COI increased to |Ux| for a given locus only. ***Handling of the situation where alleles with estimated allele frequency of 0 are present: probUxUy crashes only if present in both Ux and Uy; however, if present in either one, the likelihood is 0, so no need to calculate.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
gdistPair1(
  pair,
  afreq,
  coi,
  nr = 100,
  nm = min(coi),
  rval = NULL,
  reval = NULL,
  equalr = FALSE,
  out = "mle",
  alpha = 0.05
)

Arguments

pair

a list of length two containing two samples.

afreq

a list of allele frequencies. Each element of the list corresponds to a locus.

coi

a vector indicating complexity of infection for each sample.

nr

an integer value for the resolution of the grid (nr - 1 values between 0 and 1), over which the likelihood will be calculated. Ignored if non-null reval is provided.

nm

the number of related pairs of strains for evaluation.

rval

{r} values for the grid or for evaluation when equalr is TRUE. If NULL, will be evenly spaced between 0 and 1 and interval 1/nr.

reval

the grid of {r} combinations, over which the likelihood will be calculated. A matrix where each column represents a single combination.

equalr

a logical value. If TRUE, only equal values of r for different pairs of strains are evaluated.

out

a character string for the type of results to be returned. If "mle", an estimate is returned, if "llik" - a vector of log-likelihood for each combination.

alpha

significance level.

Value


innager/unfazeD documentation built on June 26, 2021, 6:01 p.m.