Problem 1: Inverse Numerator Relationship Matrix

During the lecture the method of computing the inverse numerator relationship matrix \(A^{-1}\) directly was introduced. The computation is based on the LDL-decomposition. As a result, we can write

\[A^{-1} = (L^T)^{-1} \cdot D^{-1} \cdot L^{-1}\] where \(L^{-1} = I-P\), and \(D^{-1}\) is a diagonal matrix with \((D^{-1})_{ii} * \sigma_u^{-2} = var(m_i)^{-1}\).

Tasks

  • Use the example pedigree given below and compute the matrices \(L^{-1}\) and \(D^{-1}\) to compute \(A^{-1}\)
  • Verify your result using the function getAinv() from package pedigreemm.

Pedigree

nr_animal <- 6
tbl_pedigree <- tibble::tibble(Calf = c(1:nr_animal),
                               Sire = c(NA, NA, NA, 1 ,3, 4),
                               Dam = c(NA, NA, NA, 2, 2, 5))
tbl_pedigree

Solution

Problem 2: Rules

The following diagram helps to illustrate the rules for constructing \(A^{-1}\)

Tasks

  • Go through the list of animals in the pedigree and write down the contributions that are made to the different elements of matrix \(A^{-1}\)
  • Based on the different contributions, try to come up with some general rules

Solution

LS0tCnRpdGxlOiBJbnZlcnNlIE51bWVyYXRvciBSZWxhdGlvbnNoaXAgTWF0cml4CmF1dGhvcjogUGV0ZXIgdm9uIFJvaHIKZGF0ZTogImByIFN5cy5EYXRlKClgIgpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sKLS0tCgpgYGB7ciBzZXR1cCwgaW5jbHVkZT1GQUxTRX0Ka25pdHI6Om9wdHNfY2h1bmskc2V0KGVjaG8gPSBUUlVFKQojIHJtZGhlbHA6OnNob3dfa25pdF9ob29rX2NhbGwoKQprbml0cjo6a25pdF9ob29rcyRzZXQoaG9va19jb252ZXJ0X29kZyA9IHJtZGhlbHA6Omhvb2tfY29udmVydF9vZGcpCmBgYAoKIyBQcm9ibGVtIDE6IEludmVyc2UgTnVtZXJhdG9yIFJlbGF0aW9uc2hpcCBNYXRyaXgKRHVyaW5nIHRoZSBsZWN0dXJlIHRoZSBtZXRob2Qgb2YgY29tcHV0aW5nIHRoZSBpbnZlcn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