Learn R Programming

ribd (version 1.0.1)

kinship: Kinship coefficients

Description

Compute the matrix of kinship coefficients (autosomal or X) of all members of a pedigree. The founders may be inbred; see pedtools::founderInbreeding() for how to set this up.

Usage

kinship(x)

kinshipX(x)

Arguments

x

A pedigree, in the form of a pedtools::ped object.

Value

A symmetric matrix containing all pairwise kinship coefficients in x.

Details

For two (not necessarily distinct) members A, B of a pedigree, their autosomal (resp. X) kinship coefficient is defined as the probability that random alleles sampled from A and B at the same autosomal (resp. X) locus, are identical by descent relative to the pedigree.

See Also

inbreeding(), kappa()

Examples

Run this code
# NOT RUN {
# Kinship coefficients in a nuclear family with two children
x = nuclearPed(2)
kinship(x)

# X chromosomal kinship coefficients in the same family
kinshipX(x)

# Recalculate the autosomal kinships if the father is 100% inbred
founderInbreeding(x, 1) = 1
kinship(x)

# }

Run the code above in your browser using DataLab