IBDestimate | R Documentation |
Estimate the pairwise IBD coefficients (κ_0, κ_1, κ_2) for
specified pairs of pedigree members, using maximum likelihood methods.
The optimization machinery is imported from the maxLik
package.
IBDestimate(x, ids, markers = NULL, start = c(0.99, 0.001), tol = 1e-07)
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 (κ_0, κ_2)
in the optimisation (passed on to |
tol |
A single numeric: the optimising tolerance value; passed on to |
This function optimises the log-likelihood function first described in (Thompson, 1975). Optimisation is done in the (κ_0, κ_2)-plane and restricted to the probability triangle defined by κ_0 ≥ 0, κ_2 ≥ 0, κ_0 + κ_2 ≤ 1.
A data.frame with 8 columns: ID1, ID2 (numeric IDs), Name1, Name2 (plot labels, if present), N (#markers with no missing alleles), κ_0, κ_1, κ_2.
E. A. Thompson (2000). Statistical Inferences from Genetic Data on Pedigrees. NSF-CBMS Regional Conference Series in Probability and Statistics. Volume 6.
examineKinships
,
IBDtriangle
, maxLik
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)) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.