Learn R Programming

nadiv (version 2.7)

makeD: Creates the dominance genetic realationship matrix

Description

Given a pedigree, the matrix of coefficients of fraternity are returned - the D matrix. Note, no inbreeding must be assumed. Will return the inverse of the D matrix by default, otherwise this operation can be skipped if desired.

Usage

makeD(pedigree, invertD = TRUE)

Arguments

pedigree
A pedigree with columns organized: ID, Dam, Sire
invertD
A logical indicating whether or not to invert the D matrix

Value

  • Athe A matrix in sparse matrix form
  • Dthe D matrix in sparse matrix form
  • logDetthe log determinant of the D matrix
  • Dinvthe inverse of the D matrix in sparse matrix form
  • listDinvthe three column form of the non-zero elements for the inverse of the D matrix

Details

There exists no convenient method of obtaining the inverse of the dominance genetic relatedness matrix (or the D matrix itself) directly from a pedigree (such as for the inverse of A, i.e., Quaas (1995)). Therefore, this function computes the coefficient of fraternity (Lynch and Walsh, 1998) for every individual in the pedigree with a non-zero additive genetic relatedness. Note, the construction of the D matrix is more computationally demanding (in time and space) than is the construction of A.

References

Quaas, R.L. 1995. Fx algorithms. An unpublished note.

Lynch M., & Walsh, B. 1998. Genetics and Analysis of Quantitative Traits. Sinauer, Sunderland, Massachusetts.

See Also

makeDsim

Examples

Run this code
DinvMat <- makeD(Mrode9)$Dinv

Run the code above in your browser using DataLab