llrdist: Calculate distance matrix based on log likelihood ratio

View source: R/dist.R

llrdistR Documentation

Calculate distance matrix based on log likelihood ratio

Description

Calculate a distance matrix, based on the log likelihood ratio comparing the hypotheses of full sibling versus unrelated, for a RAPD data set.

Usage

llrdist(dat,p=freq(dat))

Arguments

dat

A matrix of size (n.ind x n.mar) containing RAPD phenotypes, with 1 indicating the presence of a band and 0 indicating absence.

p

A vector of band allele frequencies.

Details

For each pair of individuals, at each locus, we calculate the log likelihood ratio (LLR) comparing the hypotheses unrelated with siblings, with the data being B (both have band), N (neither have band) or D (one has band, the other doesn't). These LLRs are averaged across individuals. Note: at each locus, we re-center the LLRs so that the minimum of the LLRs among B/N/D is 0; this makes the resulting distances \ge 0.

Calculations are performed in a C program.

Value

A symmetric matrix of dimension (n.ind x n.ind), containing the distances between individuals.

Author(s)

Karl W Broman broman@wisc.edu

See Also

calc.dist, fingers

Examples

data(aedes)
f <- freq(aedes)
dis <- llrdist(aedes,f)

kbroman/fingers documentation built on May 17, 2023, 11:50 p.m.