Learn R Programming

paramlink (version 1.1-5)

IBDestimate: Relatedness estimation

Description

Estimate the pairwise IBD coefficients \((\kappa_0, \kappa_1, \kappa_2)\) for specified pairs of pedigree members, using maximum likelihood methods. The optimization machinery is imported from the maxLik package.

Usage

IBDestimate(x, ids, markers = NULL, start = c(0.99, 0.001), tol = 1e-07)

Arguments

x

A single linkdat object or a list of linkdat and/or singleton objects.

ids

Either a vector of length 2, or a matrix with two columns, indicating the the pair(s) of individuals for which IBD estimates should be computed. If a matrix, each row corresponds to a pair. The entries can be either characters (matching the plot.labels of the linkdat object(s)) or integers (matching the orig.ids identifiers of the linkdat object(s)).

markers

A numeric indicating which marker(s) to include. If NULL (default), all markers are used.

start

Numeric of length 2, indicating the initial value of \((\kappa_0, \kappa_2)\) in the optimisation (passed on to maxLik).

tol

A single numeric: the optimising tolerance value; passed on to maxLik).

Value

A data.frame with 8 columns: ID1, ID2 (numeric IDs), Name1, Name2 (plot labels, if present), N (#markers with no missing alleles), \(\kappa_0\), \(\kappa_1\), \(\kappa_2\).

Details

This function optimises the log-likelihood function first described in (Thompson, 1975). Optimisation is done in the \((\kappa_0, \kappa_2)\)-plane and restricted to the probability triangle defined by \(\kappa_0 \ge 0, \kappa_2 \ge 0, \kappa_0 + \kappa_2 \le 1\).

References

E. A. Thompson (2000). Statistical Inferences from Genetic Data on Pedigrees. NSF-CBMS Regional Conference Series in Probability and Statistics. Volume 6.

See Also

examineKinships, IBDtriangle, maxLik

Examples

Run this code
# NOT RUN {
if (requireNamespace("maxLik", quietly = TRUE)) {

# Simulate marker data for two siblings
x = nuclearPed(2)
x = setPlotLabels(x, c("Sib1", "Sib2"), c(3,4))
x = simpleSim(x, 200, 1:2) # 200 equifrequent SNPs

# Estimate the IBD coefficients for the siblings
est1 = IBDestimate(x, ids=c(3,4))

# Estimate should be the same if pedigree structure is unknown
xlist = list(branch(x, 3), branch(x, 4))
est2 = IBDestimate(xlist, ids=c(3,4))
stopifnot(identical(est1, est2))

# If the pedigree has plot.labels, they can be used as IDs
est3 = IBDestimate(x, ids=c("Sib1", "Sib2"))
stopifnot(identical(est1, est3))

}

# }

Run the code above in your browser using DataLab