Imaginings of a Livestock Geneticist

Recursive Method to Generate A Inverse
(From Cholesky decomposition)

This section describes how to generate the A-1 and was influential in generating simple addition based rules to generate the A-1 for the algorithm that is currently widely used and fully discussed in the next section, Recursive Method to Create A Inverse. As outlined in the previous section, when utilizing a relationship matrix in the mixed model equations the A-1 is needed, instead of A. The method outlined in the current section is based on methods to generate L and is outlined below:

$$ A = LL' = TDDT' $$

Where, L = TD, where D is a diagonal matrix with diagonal elements identical to those of L and T is a matrix computed by the methods outlined in Recursive Method to Generate A , except that all diagonal elements of T = 1.

$$ A^{-1} = (LL')^{-1} = (T^{-1}){'}(D^{-1})^2 (T^{-1}) $$

As a result the new lower triangular matrix to construct is (T-1), which is easy to compute because it contains all 1's on the diagonal and the only nonzero elements to the left of the diagonal for a given row is the value -0.5 for columns corresponding to the known parents of an individual. This can be easily verified by augmenting the code to create L and taking the inverse of this matrix. Although the computation of (D-1)2 is easy to derive (i.e. (1 / D)2), the generation of the D values is time consuming because the full L needs to be stored.
    Similar to previous methods, the pedigree has to be sorted so that parents come before progeny. Due to the pedigree being sorted, the recursive method has a very simple form. Look at the 'Recursive Method to Create G Inverse" sections R Code to see the impact of using a pedigree that isn't sorted. Lastly, if animals are numbered from 1 to the very last animal then the sire and dam values can be used to index where the respective elements are located within the algorithm. Algorithms to sort and renumber a pedigree is outlined in the following section .

The following pedigree file from Henderson (1976) can be utilized with the R code above. The columns are animal, sire and dam and the pedigree is already ordered so that parents come before progeny. Lastly the animals go from 1 to the total number of animals. Outlined below is what T-1 looks like at the end of each iteration of the for loop. Furthermore, the A-1 can be generated based on the formula above to verify that it works. If you use simple pedigree structures you will start to notice simple addition rules that can be utilized without having to go through the matrix multiplication (i.e. (T-1)' (D-1)2 (T-1))!

T-1: Loop Iteration 1
1 2 3 4 5 6 7
1 1.0 - - - - - -
2 0.0 0.0 - - - - -
3 0.0 0.0 0.0 - - - -
4 0.0 0.0 0.0 0.0 - - -
5 0.0 0.0 0.0 0.0 0.0 - -
6 0.0 0.0 0.0 0.0 0.0 0.0 -
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0
T-1: Loop Iteration 2
1 2 3 4 5 6 7
1 1.0 - - - - - -
2 0.0 1.0 - - - - -
3 0.0 0.0 0.0 - - - -
4 0.0 0.0 0.0 0.0 - - -
5 0.0 0.0 0.0 0.0 0.0 - -
6 0.0 0.0 0.0 0.0 0.0 0.0 -
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0
T-1: Loop Iteration 3
1 2 3 4 5 6 7
1 1.0 - - - - - -
2 0.0 1.0 - - - - -
3 -0.5 0.0 1.0 - - - -
4 0.0 0.0 0.0 0.0 - - -
5 0.0 0.0 0.0 0.0 0.0 - -
6 0.0 0.0 0.0 0.0 0.0 0.0 -
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0
T-1: Loop Iteration 4
1 2 3 4 5 6 7
1 1.0 - - - - - -
2 0.0 1.0 - - - - -
3 -0.5 0.0 1.0 - - - -
4 -0.5 -0.5 0.0 1.0 - - -
5 0.0 0.0 0.0 0.0 0.0 - -
6 0.0 0.0 0.0 0.0 0.0 0.0 -
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0
T-1: Loop Iteration 5
1 2 3 4 5 6 7
1 1.0 - - - - - -
2 0.0 1.0 - - - - -
3 -0.5 0.0 1.0 - - - -
4 -0.5 -0.5 0.0 1.0 - - -
5 0.0 0.0 -0.5 -0.5 1.0 - -
6 0.0 0.0 0.0 0.0 0.0 0.0 -
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0
T-1: Loop Iteration 6
1 2 3 4 5 6 7
1 1.0 - - - - - -
2 0.0 1.0 - - - - -
3 -0.5 0.0 1.0 - - - -
4 -0.5 -0.5 0.0 1.0 - - -
5 0.0 0.0 -0.5 -0.5 1.0 - -
6 -0.5 0.0 0.0 -0.5 0.0 1.0 -
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0
T-1: Loop Iteration 7
1 2 3 4 5 6 7
1 1.0 - - - - - -
2 0.0 1.0 - - - - -
3 -0.5 0.0 1.0 - - - -
4 -0.5 -0.5 0.0 1.0 - - -
5 0.0 0.0 -0.5 -0.5 1.0 - -
6 -0.5 0.0 0.0 -0.5 0.0 1.0 -
7 0.0 0.0 0.0 0.0 -0.5 -0.5 1.0

References