IBDestimate {paramlink} | R Documentation |
Relatedness estimation
Description
Estimate the pairwise IBD coefficients 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 |
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
|
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 |
tol |
A single numeric: the optimising tolerance value; passed on to |
Details
This function optimises the log-likelihood function first described in (Thompson, 1975).
Optimisation is done in the -plane and restricted to the
probability triangle defined by
.
Value
A data.frame with 8 columns: ID1, ID2 (numeric IDs), Name1, Name2 (plot labels, if present), N
(#markers with no missing alleles), ,
,
.
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
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))
}