Learn R Programming

ribd (version 1.1.0)

generalised_karigl: Karigl's generalised kinship coefficients

Description

Compute generalised kinship coefficients, as defined by Karigl (1981), involving up to 4 pedigree members. The founders may be inbred; see Examples.

Usage

generalisedKinship3(
  x,
  ids,
  sparse = NA,
  chromType = "autosomal",
  verbose = FALSE
)

generalisedKinship4( x, ids, sparse = NA, chromType = "autosomal", verbose = FALSE )

generalisedKinship22( x, ids, sparse = NA, chromType = "autosomal", verbose = FALSE )

Arguments

x

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

ids

A vector of ID labels, of length 3 for generalisedKinship3() and 4 for generalisedKinship4() and generalisedKinship22().

sparse

A positive integer, indicating the pedigree size limit for using sparse arrays. If NA, a default limit of 50 is used.

chromType

Either "autosomal" or "x".

verbose

A logical.

Value

A numeric of length 1.

Details

The function generalisedKinship3() computes the generalised kinship coefficient of three (not necessarily distinct) members a, b and c, defined as the probability that if a random allele is chosen from each of them, they are all identical by descent.

The function generalisedKinship4() computes the generalised kinship coefficient of four individuals, defined similarly to the above.

The function generalisedKinship22() computes the generalised kinship coefficient of two pairs of members, defined as the probability that in both pairs simultaneously, random alleles chosen from the two individuals are IBD.

See Also

kinship(), kinshipX(), condensedIdentity(), condensedIdentityX()

Examples

Run this code
# NOT RUN {
# Generalised kinship between three siblings
x = nuclearPed(3)
phi3 = generalisedKinship3(x, ids = 3:5)

# Recalculate if the father is 100% inbred
founderInbreeding(x, 1) = 1
phi3_inbred = generalisedKinship3(x, ids = 3:5)

stopifnot(phi3 == 1/16, phi3_inbred == 1/8 + 1/32)

# }

Run the code above in your browser using DataLab