ki.dist: Computes distribution of KI for profiles with stated...

Description Usage Arguments Value

Description

Computes, per marker, the distribution of a Kinship Index (KI) comparing hypotheses hyp.1 vs hyp.2 for profiles with a given relationship (hyp.true). Optionally with respect to a profile x.

Usage

1
2
3
4
ki.dist(x, hyp.1, hyp.2 = "UN", hyp.true = "UN", freqs.ki = get.freqs(x),
  freqs.true = freqs.ki, markers = intersect(names(freqs.ki),
  names(freqs.true)), theta.ki = 0, theta.true = theta.ki,
  min.freq = .Machine$double.eps)

Arguments

x

(optional) An integer matrix specifying a single profile.

hyp.1

A character string giving the hypothesis in the numerator of the KI. Should be one of ibdprobs, e.g. "FS" (full sibling) or "PO" (parent/offspring) or "UN" (unrelated).

hyp.2

A character string giving the hypothesis in the denominator of the KI. Should be one of ibdprobs, e.g. "FS" (full sibling) or "PO" (parent/offspring) or "UN" (unrelated). Defaults to "UN".

hyp.true

A character string specifying the true relationship between the case profile and the other profile. Should be one of ibdprobs, e.g. "FS" (full sibling) or "PO" (parent/offspring) or "UN" (unrelated). Defaults to "UN".

freqs.ki

A list specifying the allelic frequencies that are used when computing the KI.

freqs.true

(optionally) A list specifying the allelic frequencies that are used for computing the probabily distribution of the KI under hyp.true. When not provided, the function will use freqs. One might use different allelic frequencies freqs.rel when for example the case profile and relative come from some population, while KIs are computed with frequencies from another population.

markers

Character vector stating the markers for which the KI distribution is derived. Defaults to the intersection of the markers of freqs.ki and freqs.true.

theta.ki

numeric value specifying the amount of background relatedness.

theta.true

numeric value specifying the amount of background relatedness.

min.freq

Alleles with a frequency in freqs.ki and freqs.true smaller than this value will be set to frequency 0 to avoid numerical problems. Defaults to .Machine$double.eps, which is normally 2.220446e-16.

Value

A list of distributions, where a distribution is specified by a list with vectors x, fx.


DNAprofiles documentation built on Jan. 15, 2017, 9:27 p.m.