ki.ibs.joint.dist: Computes joint distribution of KI and IBS for profiles with...

Description Usage Arguments Value

Description

Computes, per locus, the joint distribution of the number of IBS alleles and a Kinship Index (KI) comparing hypotheses hyp.1 vs hyp.2 for profiles with a given relationship (hyp.true), optionally with respect to the case profile (e.g. "FS" for full siblings).

Usage

1
2
3
4
ki.ibs.joint.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)

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. Default 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.

Value

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


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