probUxUy: Calculate likelihood for a pair U_x, U_y

Description Usage Arguments Details Value

View source: R/probUxUy.R

Description

Calculates log-likelihood for a pair of samples at a single locus.

Usage

1
2
3
probUxUy(Ux, Uy, nx, ny, probs, reval)

probUxUyEqr(Ux, Uy, nx, ny, probs, rval, nm)

Arguments

Ux, Uy

sets of unique alleles for two samples at a given locus. Vectors of indices corresponding to ordered probabilities in probs.

nx, ny

complexity of infection for two samples. Vectors of length 1.

probs

a vector of population allele frequencies at a given locus. (Should sum to one - not checked!)

reval

a matrix containing the grid of {r} combinations, over which the likelihood is to be calculated. Each column represents a single combination.

rval

a vector of r values, over which the likelihood is to be calculated.

nm

the number of related strains.

Details

probUxUyEqr is used for a special case when all pairs of strains are assumed to be related with the same parameter r. For that case, fast calculations are performed, and the results are equivalent to the general case with each value of rval is repeated nm times.

Value

A vector of log-likelihood values for each evaluated {r} combination (or a value for probUxUyEqr.


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