inbreeding {pedigreeTools} | R Documentation |
Inbreeding coefficients from a pedigree
Description
Create the inbreeding coefficients according to the algorithm given in "Comparison of four direct algorithms for computing inbreeding coefficients" by Mehdi Sargolzaei and Hiroaki Iwaisaki, Animal Science Journal (2005) 76, 401–406.
Usage
inbreeding(ped)
Arguments
ped |
Value
the inbreeding coefficients as a numeric vector
Examples
ped <- pedigree(sire = c(NA, NA, 1, 1, 4, 5),
dam = c(NA, NA, 2, NA, 3, 2),
label = 1:6)
(F <- inbreeding(ped))
# Test for correctness
FExp <- c(0.000, 0.000, 0.000, 0.000, 0.125, 0.125)
stopifnot(!any(abs(F - FExp) > .Machine$double.eps))
[Package pedigreeTools version 0.2 Index]