coeffTable {ribd}R Documentation

Table of pairwise relatedness coefficients

Description

Creates a data frame containing various relatedness coefficients between all pairs of individuals in a given pedigree.

Usage

coeffTable(
  x,
  ids = labels(x),
  coeff = c("f", "phi", "deg", "kappa", "identity", "detailed"),
  self = FALSE,
  Xchrom = FALSE
)

Arguments

x

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

ids

A character (or coercible to character) containing ID labels of two or more pedigree members.

coeff

A character vector containing one or more of the keywords "f", "phi", "deg", "kappa", "identity", "detailed".

self

A logical indicating if self-relationships should be included. Default: FALSE.

Xchrom

A logical indicating if the coefficients should be autosomal (default) or X-chromosomal. If Xchrom = NA, both sets are included.

Details

Available coefficients (indicated in coeff) include:

Value

A data frame with one row for each pair of individuals. The first two columns are characters named id1 and id2, while remaining columns are numeric. Columns containing X-chromosomal coefficients are suffixed with ".X".

If "f" (inbreeding) is the only coefficient, the data frame has one row per individual, and the first column is named id.

Note: If x has members with unknown sex, all X-chromosomal coefficients are NA.

Examples

# Uncle-nephew pedigree
x = avuncularPed()

# Complete table
coeffTable(x)

# Only selected coefficients
coeffTable(x, coeff = c("phi", "deg", "kappa"))

# Only the uncle-nephew pair
coeffTable(x, ids = c(3, 6), coeff = c("phi", "deg", "kappa"))

# X-chromosomal coefficients
coeffTable(x, Xchrom = TRUE, coeff = "kappa")

# Both autosomal and X
coeffTable(x, Xchrom = NA, coeff = "phi")


[Package ribd version 1.7.0 Index]