MABM_16M_MAM_November-06-2014_a November 6, 2014

Obs animal sire dam afa afb sex wwt
1 1 0 0 1.00 0.00 1 289
2 2 0 0 0.00 1.00 2 245
3 3 0 2 0.50 0.50 2 256
4 4 1 0 0.50 0.50 2 261
5 5 1 2 0.50 0.50 1 292
6 6 1 3 0.75 0.25 1 286



MABM_16M_MAM_November-06-2014_a November 6, 2014
Model_1_Animal multibreed_uneqvar_res_add_nadd_November-06-2014_a November 6, 2014

ANIMAL BREEDING NOTES

CHAPTER 16M ALL MODELS

MULTIBREED ANIMAL MODELS WITH:

1) UNEQUAL RESIDUAL, ADDITIVE, AND NONADDITIVE GENETIC VARIANCES

2) EQUAL RESIDUAL VARIANCES, UNEQUAL ADDITIVE AND NONADDITIVE GENETIC VARIANCES

3) EQUAL RESIDUAL AND ADDITIVE GENETIC VARIANCES, UNEQUAL NONADDITIVE GENETIC VARIANCES

4) EQUAL RESIDUAL AND ADDITIVE GENETIC VARIANCES, NO RANDOM NONADDITIVE GENETIC EFFECTS

Mauricio A. Elzo, University of Florida, elzo@animal.ufl.edu

Read input dataset (SAS file)

   OBS    animal      sire       dam       afa       afb       sex       wwt                                                                          
------ --------- --------- --------- --------- --------- --------- ---------                                                                          
     1    1.0000         0         0    1.0000         0    1.0000  289.0000                                                                          
     2    2.0000         0         0         0    1.0000    2.0000  245.0000                                                                          
     3    3.0000         0    2.0000    0.5000    0.5000    2.0000  256.0000                                                                          
     4    4.0000    1.0000         0    0.5000    0.5000    2.0000  261.0000                                                                          
     5    5.0000    1.0000    2.0000    0.5000    0.5000    1.0000  292.0000                                                                          
     6    6.0000    1.0000    3.0000    0.7500    0.2500    1.0000  286.0000                                                                          
                                                                                                                                                      

datmat = matrix of input data

datmat
1 0 0 1 0 1 289
2 0 0 0 1 2 245
3 0 2 0.5 0.5 2 256
4 1 0 0.5 0.5 2 261
5 1 2 0.5 0.5 1 292
6 1 3 0.75 0.25 1 286

Enter Parameters for Current Run

Enter restronsol = 1 to impose restrictions on solutions to solve the MME, else = 0 if not

restronsol
0

No restrictions imposed on solutions to solve MME

Define number of traits = nt = 1 (DO NOT CHANGE; This program is for single traits ONLY !!

nt
1

Enter nanim = Number of animals

nanim
6

Enter nrec = Number of records

nrec
6

Enter nf = Number of fixed effects in the MME

nf
6

Enter nga = Number of random additive genetic effects in the MME

nga
6

ngn = Number of random nonadditive genetic effects in the MME

ngn
6

Enter uneqresvar = 1 if unequal residual variances else uneqresvar = 0

uneqresvar
1

Enter uneqaddvar = 1 if unequal residual variances else uneqaddvar = 0

uneqaddvar
1

Compute neq = nf+nga+ngn = total number of MME

neq
18

Define pedigf = pedigree file with breed composition of animals, sires, and dams

pedigf
1 0 0 1 0 1 0 1 0
2 0 0 0 1 0 1 0 1
3 0 2 0.5 0.5 1 0 0 1
4 1 0 0.5 0.5 1 0 0 1
5 1 2 0.5 0.5 1 0 0 1
6 1 3 0.75 0.25 1 0 0.5 0.5

Construct xf = matrix of fixed and random effects

Construct fixed effects in matrix xf

xf
  COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16 COL17 COL18
ROW1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
ROW2 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
ROW3 1 0.5 0.5 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0
ROW4 1 0.5 0.5 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0
ROW5 1 0.5 0.5 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
ROW6 1 0.75 0.25 0.5 1 0 0 0 0 0 0 0 0 0 0 0 0 0

Construct random additive genetic effects in matrix xf

xf
  COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16 COL17 COL18
ROW1 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0
ROW2 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0
ROW3 1 0.5 0.5 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0
ROW4 1 0.5 0.5 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0
ROW5 1 0.5 0.5 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0
ROW6 1 0.75 0.25 0.5 1 0 0 0 0 0 0 1 0 0 0 0 0 0

Construct random nonadditive genetic effects in matrix xf

xf
  COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16 COL17 COL18
ROW1 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0
ROW2 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0
ROW3 1 0.5 0.5 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0
ROW4 1 0.5 0.5 1 0 1 0 0 0 1 0 0 1 0 0 0 0 0
ROW5 1 0.5 0.5 1 1 0 0 0 0 0 1 0 1 1 0 0 0 0
ROW6 1 0.75 0.25 0.5 1 0 0 0 0 0 0 1 0.5 0 0.5 0 0 0

Make x = xf, i.e., use computed xf

x
  COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16 COL17 COL18
ROW1 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0
ROW2 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0
ROW3 1 0.5 0.5 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0
ROW4 1 0.5 0.5 1 0 1 0 0 0 1 0 0 1 0 0 0 0 0
ROW5 1 0.5 0.5 1 1 0 0 0 0 0 1 0 1 1 0 0 0 0
ROW6 1 0.75 0.25 0.5 1 0 0 0 0 0 0 1 0.5 0 0.5 0 0 0

Enter intrabreed and interbreed environmental variances

veaa vebb veab
49 16 25

Compute vef = vector of multibreed environmental variances

vef
49
16
32.5
32.5
32.5
47

Make ve = vef, i.e., use computed ve

ve
49
16
32.5
32.5
32.5
47

r = matrix of residual covariances

r
49 0 0 0 0 0
0 16 0 0 0 0
0 0 32.5 0 0 0
0 0 0 32.5 0 0
0 0 0 0 32.5 0
0 0 0 0 0 47

invr = inverse of matrix of residual covariances

invr
0.0204082 0 0 0 0 0
0 0.0625 0 0 0 0
0 0 0.0307692 0 0 0
0 0 0 0.0307692 0 0
0 0 0 0 0.0307692 0
0 0 0 0 0 0.0212766

Read yf = vector of records

yf
289
245
256
261
292
286

Make y = yf, i.e., use read yf

y
289
245
256
261
292
286

Compute xtinvr = x transpose times r

xtinvr
0.0204082 0.0625 0.0307692 0.0307692 0.0307692 0.0212766
0.0204082 0 0.0153846 0.0153846 0.0153846 0.0159574
0 0.0625 0.0153846 0.0153846 0.0153846 0.0053191
0 0 0.0307692 0.0307692 0.0307692 0.0106383
0.0204082 0 0 0 0.0307692 0.0212766
0 0.0625 0.0307692 0.0307692 0 0
0.0204082 0 0 0 0 0
0 0.0625 0 0 0 0
0 0 0.0307692 0 0 0
0 0 0 0.0307692 0 0
0 0 0 0 0.0307692 0
0 0 0 0 0 0.0212766
0 0 0 0.0307692 0.0307692 0.0106383
0 0 0.0307692 0 0.0307692 0
0 0 0 0 0 0.0106383
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0

Compute xtinvr = x transpose times r times x

xtinvrx
  COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16 COL17 COL18
ROW1 0.1964925 0.0825195 0.113973 0.102946 0.072454 0.1240385 0.0204082 0.0625 0.0307692 0.0307692 0.0307692 0.0212766 0.0721768 0.0615385 0.0106383 0 0 0
ROW2 0.0825195 0.0554532 0.0270663 0.0541326 0.0517502 0.0307692 0.0204082 0 0.0153846 0.0153846 0.0153846 0.0159574 0.038748 0.0307692 0.0079787 0 0 0
ROW3 0.113973 0.0270663 0.0869067 0.0488134 0.0207038 0.0932692 0 0.0625 0.0153846 0.0153846 0.0153846 0.0053191 0.0334288 0.0307692 0.0026596 0 0 0
ROW4 0.102946 0.0541326 0.0488134 0.0976268 0.0414075 0.0615385 0 0 0.0307692 0.0307692 0.0307692 0.0106383 0.0668576 0.0615385 0.0053191 0 0 0
ROW5 0.072454 0.0517502 0.0207038 0.0414075 0.072454 0 0.0204082 0 0 0 0.0307692 0.0212766 0.0414075 0.0307692 0.0106383 0 0 0
ROW6 0.1240385 0.0307692 0.0932692 0.0615385 0 0.1240385 0 0.0625 0.0307692 0.0307692 0 0 0.0307692 0.0307692 0 0 0 0
ROW7 0.0204082 0.0204082 0 0 0.0204082 0 0.0204082 0 0 0 0 0 0 0 0 0 0 0
ROW8 0.0625 0 0.0625 0 0 0.0625 0 0.0625 0 0 0 0 0 0 0 0 0 0
ROW9 0.0307692 0.0153846 0.0153846 0.0307692 0 0.0307692 0 0 0.0307692 0 0 0 0 0.0307692 0 0 0 0
ROW10 0.0307692 0.0153846 0.0153846 0.0307692 0 0.0307692 0 0 0 0.0307692 0 0 0.0307692 0 0 0 0 0
ROW11 0.0307692 0.0153846 0.0153846 0.0307692 0.0307692 0 0 0 0 0 0.0307692 0 0.0307692 0.0307692 0 0 0 0
ROW12 0.0212766 0.0159574 0.0053191 0.0106383 0.0212766 0 0 0 0 0 0 0.0212766 0.0106383 0 0.0106383 0 0 0
ROW13 0.0721768 0.038748 0.0334288 0.0668576 0.0414075 0.0307692 0 0 0 0.0307692 0.0307692 0.0106383 0.0668576 0.0307692 0.0053191 0 0 0
ROW14 0.0615385 0.0307692 0.0307692 0.0615385 0.0307692 0.0307692 0 0 0.0307692 0 0.0307692 0 0.0307692 0.0615385 0 0 0 0
ROW15 0.0106383 0.0079787 0.0026596 0.0053191 0.0106383 0 0 0 0 0 0 0.0106383 0.0053191 0 0.0053191 0 0 0
ROW16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ROW17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ROW18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Enter intrabreed and interbreed additive genetic variances

vaaa vabb vaab
36 9 4

Compute vaf = vector of multibreed additive genetic variances

pedigf
1 0 0 1 0 1 0 1 0
2 0 0 0 1 0 1 0 1
3 0 2 0.5 0.5 1 0 0 1
4 1 0 0.5 0.5 1 0 0 1
5 1 2 0.5 0.5 1 0 0 1
6 1 3 0.75 0.25 1 0 0.5 0.5

vaf
36
9
22.5
22.5
22.5
30.25

Compute daf = vector of computed residual additive genetic variances

Recall: (Ga)-1 = (I - 1/2 P') (Da)-1 (I - 1/2 P)

daf
36
9
20.25
13.5
11.25
15.625

Make da = daf, i.e., use computed da

Compute dainv = inverse of da

dainv = inverse of matrix of residual additive genetic variances

dainv
0.0277778
0.1111111
0.0493827
0.0740741
0.0888889
0.064

Enter intrabreed and interbreed nonadditive genetic variances

vnab
16

Compute vnf = vector of multibreed additive genetic variances

vnf
16
16
16
16
16
16

Compute dnf = vector of computed residual nonadditive genetic variances

Recall: (Gn)-1 = (I - 1/2 P') (Dn)-1 (I - 1/2 P)

dnf
16
16
12
12
8
8

Make dn = dnf, i.e., use computed dn

Compute dninv = inverse of dn

dninv = inverse of matrix of residual nonadditive genetic variances

dninv
0.0625
0.0625
0.0833333
0.0833333
0.125
0.125

Compute gainv = inverse of the matrix of multibreed additive genetic covariances

Using algorithm to compute gainv directly; Elzo (1990a),JAS 68:1215-1228

gainv
0.0845185 0.0222222 0.016 -0.037037 -0.044444 -0.032
0.0222222 0.145679 -0.024691 0 -0.044444 0
0.016 -0.024691 0.0653827 0 0 -0.032
-0.037037 0 0 0.0740741 0 0
-0.044444 -0.044444 0 0 0.0888889 0
-0.032 0 -0.032 0 0 0.064

gainv
0.085 0.022 0.016 -0.037 -0.044 -0.032
0.022 0.146 -0.025 0.000 -0.044 0.000
0.016 -0.025 0.065 0.000 0.000 -0.032
-0.037 0.000 0.000 0.074 0.000 0.000
-0.044 -0.044 0.000 0.000 0.089 0.000
-0.032 0.000 -0.032 0.000 0.000 0.064

Compute gninv = inverse of the matrix of regression nonadditive genetic covariances

Using algorithm to compute gninv directly; Elzo (1990b),JAS 68:4079-4099

gninv
0.1458333 0.03125 0.03125 -0.041667 -0.0625 -0.0625
0.03125 0.1145833 -0.041667 0 -0.0625 0
0.03125 -0.041667 0.1145833 0 0 -0.0625
-0.041667 0 0 0.0833333 0 0
-0.0625 -0.0625 0 0 0.125 0
-0.0625 0 -0.0625 0 0 0.125

gninv
0.146 0.031 0.031 -0.042 -0.063 -0.063
0.031 0.115 -0.042 0.000 -0.063 0.000
0.031 -0.042 0.115 0.000 0.000 -0.063
-0.042 0.000 0.000 0.083 0.000 0.000
-0.063 -0.063 0.000 0.000 0.125 0.000
-0.063 0.000 -0.063 0.000 0.000 0.125

Compute lhs = left hand side of the MME

Add gainv to lhs

Add gninv to lhs

lhs
  COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16 COL17 COL18
ROW1 0.1964925 0.0825195 0.113973 0.102946 0.072454 0.1240385 0.0204082 0.0625 0.0307692 0.0307692 0.0307692 0.0212766 0.0721768 0.0615385 0.0106383 0 0 0
ROW2 0.0825195 0.0554532 0.0270663 0.0541326 0.0517502 0.0307692 0.0204082 0 0.0153846 0.0153846 0.0153846 0.0159574 0.038748 0.0307692 0.0079787 0 0 0
ROW3 0.113973 0.0270663 0.0869067 0.0488134 0.0207038 0.0932692 0 0.0625 0.0153846 0.0153846 0.0153846 0.0053191 0.0334288 0.0307692 0.0026596 0 0 0
ROW4 0.102946 0.0541326 0.0488134 0.0976268 0.0414075 0.0615385 0 0 0.0307692 0.0307692 0.0307692 0.0106383 0.0668576 0.0615385 0.0053191 0 0 0
ROW5 0.072454 0.0517502 0.0207038 0.0414075 0.072454 0 0.0204082 0 0 0 0.0307692 0.0212766 0.0414075 0.0307692 0.0106383 0 0 0
ROW6 0.1240385 0.0307692 0.0932692 0.0615385 0 0.1240385 0 0.0625 0.0307692 0.0307692 0 0 0.0307692 0.0307692 0 0 0 0
ROW7 0.0204082 0.0204082 0 0 0.0204082 0 0.1049267 0.0222222 0.016 -0.037037 -0.044444 -0.032 0 0 0 0 0 0
ROW8 0.0625 0 0.0625 0 0 0.0625 0.0222222 0.208179 -0.024691 0 -0.044444 0 0 0 0 0 0 0
ROW9 0.0307692 0.0153846 0.0153846 0.0307692 0 0.0307692 0.016 -0.024691 0.0961519 0 0 -0.032 0 0.0307692 0 0 0 0
ROW10 0.0307692 0.0153846 0.0153846 0.0307692 0 0.0307692 -0.037037 0 0 0.1048433 0 0 0.0307692 0 0 0 0 0
ROW11 0.0307692 0.0153846 0.0153846 0.0307692 0.0307692 0 -0.044444 -0.044444 0 0 0.1196581 0 0.0307692 0.0307692 0 0 0 0
ROW12 0.0212766 0.0159574 0.0053191 0.0106383 0.0212766 0 -0.032 0 -0.032 0 0 0.0852766 0.0106383 0 0.0106383 0 0 0
ROW13 0.0721768 0.038748 0.0334288 0.0668576 0.0414075 0.0307692 0 0 0 0.0307692 0.0307692 0.0106383 0.2126909 0.0620192 0.0365691 -0.041667 -0.0625 -0.0625
ROW14 0.0615385 0.0307692 0.0307692 0.0615385 0.0307692 0.0307692 0 0 0.0307692 0 0.0307692 0 0.0620192 0.1761218 -0.041667 0 -0.0625 0
ROW15 0.0106383 0.0079787 0.0026596 0.0053191 0.0106383 0 0 0 0 0 0 0.0106383 0.0365691 -0.041667 0.1199025 0 0 -0.0625
ROW16 0 0 0 0 0 0 0 0 0 0 0 0 -0.041667 0 0 0.0833333 0 0
ROW17 0 0 0 0 0 0 0 0 0 0 0 0 -0.0625 -0.0625 0 0 0.125 0
ROW18 0 0 0 0 0 0 0 0 0 0 0 0 -0.0625 0 -0.0625 0 0 0.125

lhs
0.196 0.083 0.114 0.103 0.072 0.124 0.020 0.063 0.031 0.031 0.031 0.021 0.072 0.062 0.011 0.000 0.000 0.000
0.083 0.055 0.027 0.054 0.052 0.031 0.020 0.000 0.015 0.015 0.015 0.016 0.039 0.031 0.008 0.000 0.000 0.000
0.114 0.027 0.087 0.049 0.021 0.093 0.000 0.063 0.015 0.015 0.015 0.005 0.033 0.031 0.003 0.000 0.000 0.000
0.103 0.054 0.049 0.098 0.041 0.062 0.000 0.000 0.031 0.031 0.031 0.011 0.067 0.062 0.005 0.000 0.000 0.000
0.072 0.052 0.021 0.041 0.072 0.000 0.020 0.000 0.000 0.000 0.031 0.021 0.041 0.031 0.011 0.000 0.000 0.000
0.124 0.031 0.093 0.062 0.000 0.124 0.000 0.063 0.031 0.031 0.000 0.000 0.031 0.031 0.000 0.000 0.000 0.000
0.020 0.020 0.000 0.000 0.020 0.000 0.105 0.022 0.016 -0.037 -0.044 -0.032 0.000 0.000 0.000 0.000 0.000 0.000
0.063 0.000 0.063 0.000 0.000 0.063 0.022 0.208 -0.025 0.000 -0.044 0.000 0.000 0.000 0.000 0.000 0.000 0.000
0.031 0.015 0.015 0.031 0.000 0.031 0.016 -0.025 0.096 0.000 0.000 -0.032 0.000 0.031 0.000 0.000 0.000 0.000
0.031 0.015 0.015 0.031 0.000 0.031 -0.037 0.000 0.000 0.105 0.000 0.000 0.031 0.000 0.000 0.000 0.000 0.000
0.031 0.015 0.015 0.031 0.031 0.000 -0.044 -0.044 0.000 0.000 0.120 0.000 0.031 0.031 0.000 0.000 0.000 0.000
0.021 0.016 0.005 0.011 0.021 0.000 -0.032 0.000 -0.032 0.000 0.000 0.085 0.011 0.000 0.011 0.000 0.000 0.000
0.072 0.039 0.033 0.067 0.041 0.031 0.000 0.000 0.000 0.031 0.031 0.011 0.213 0.062 0.037 -0.042 -0.063 -0.063
0.062 0.031 0.031 0.062 0.031 0.031 0.000 0.000 0.031 0.000 0.031 0.000 0.062 0.176 -0.042 0.000 -0.063 0.000
0.011 0.008 0.003 0.005 0.011 0.000 0.000 0.000 0.000 0.000 0.000 0.011 0.037 -0.042 0.120 0.000 0.000 -0.063
0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 -0.042 0.000 0.000 0.083 0.000 0.000
0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 -0.063 -0.063 0.000 0.000 0.125 0.000
0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 -0.063 0.000 -0.063 0.000 0.000 0.125

Compute rhs = right hand side of the MME

rhs
52.187873
22.907943
29.27993
27.934861
20.967681
31.220192
5.8979592
15.3125
7.8769231
8.0307692
8.9846154
6.0851064
20.057938
16.861538
3.0425532
0
0
0

rhs
52.19
22.91
29.28
27.93
20.97
31.22
5.90
15.31
7.88
8.03
8.98
6.09
20.06
16.86
3.04
0.00
0.00
0.00

Compute ginvlhs = generalized inverse of the left hand side of the MME

ginvlhs
  COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16 COL17 COL18
ROW1 6.109904 8.913722 -2.803818 -9.306324 3.087427 3.022477 -7.926874 -2.328563 -2.371548 -3.727747 -4.653423 -6.466699 0.279336 0.057941 -0.476945 0.139668 0.168638 -0.098804
ROW2 8.913722 50.883679 -41.96996 -24.45589 -13.92937 22.843094 -16.42015 4.213140 -4.733261 -10.72450 -0.208247 -11.32742 5.019945 3.172238 1.297844 2.509973 4.096091 3.158895
ROW3 -2.803818 -41.96996 39.166139 15.149566 17.016799 -19.82062 8.493276 -6.541704 2.361713 6.996749 -4.445176 4.860721 -4.740609 -3.114297 -1.774789 -2.370305 -3.927453 -3.257699
ROW4 -9.306324 -24.45589 15.149566 51.951708 5.762873 -15.06920 3.935834 1.225955 -3.814835 -1.709949 -3.144321 0.338875 -12.35895 -11.71231 -5.749260 -6.179476 -12.03563 -9.054106
ROW5 3.087427 -13.92937 17.016799 5.762873 18.849040 -15.76161 -6.816800 -2.342613 1.435093 0.244439 -9.071738 -5.837987 -3.670710 -3.523624 -2.970311 -1.835355 -3.597167 -3.320511
ROW6 3.022477 22.843094 -19.82062 -15.06920 -15.76161 18.784090 -1.110074 0.014050 -3.806642 -3.972186 4.418315 -0.628712 3.950046 3.581565 2.493366 1.975023 3.765805 3.221706
ROW7 -7.926874 -16.42015 8.493276 3.935834 -6.816800 -1.110074 33.110285 0.543672 3.522765 14.924127 16.380087 19.557891 -1.933056 1.615266 1.284318 -0.966528 -0.158895 -0.324369
ROW8 -2.328563 4.213140 -6.541704 1.225955 -2.342613 0.014050 0.543672 8.856217 3.816478 0.703184 4.680283 2.234690 0.511227 -0.525208 -0.241632 0.255613 -0.006991 0.134797
ROW9 -2.371548 -4.733261 2.361713 -3.814835 1.435093 -3.806642 3.522765 3.816478 18.195128 3.811949 4.162544 9.489718 2.430301 -2.079779 -1.565673 1.215151 0.175261 0.432314
ROW10 -3.727747 -10.72450 6.996749 -1.709949 0.244439 -3.972186 14.924127 0.703184 3.811949 18.852512 7.649193 9.824876 -2.500208 2.383258 1.367055 -1.250104 -0.058475 -0.566577
ROW11 -4.653423 -0.208247 -4.445176 -3.144321 -9.071738 4.418315 16.380087 4.680283 4.162544 7.649193 21.218448 11.831697 -0.641007 0.241550 0.719961 -0.320504 -0.199729 0.039477
ROW12 -6.466699 -11.32742 4.860721 0.338875 -5.837987 -0.628712 19.557891 2.234690 9.489718 9.824876 11.831697 27.550453 0.054436 0.610742 -0.692396 0.027218 0.332589 -0.318980
ROW13 0.279336 5.019945 -4.740609 -12.35895 -3.670710 3.950046 -1.933056 0.511227 2.430301 -2.500208 -0.641007 0.054436 14.182305 1.867407 0.859136 7.091152 8.024856 7.520720
ROW14 0.057941 3.172238 -3.114297 -11.71231 -3.523624 3.581565 1.615266 -0.525208 -2.079779 2.383258 0.241550 0.610742 1.867407 13.916785 7.282104 0.933704 7.892096 4.574756
ROW15 -0.476945 1.297844 -1.774789 -5.749260 -2.970311 2.493366 1.284318 -0.241632 -1.565673 1.367055 0.719961 -0.692396 0.859136 7.282104 15.429192 0.429568 4.070620 8.144164
ROW16 0.139668 2.509973 -2.370305 -6.179476 -1.835355 1.975023 -0.966528 0.255613 1.215151 -1.250104 -0.320504 0.027218 7.091152 0.933704 0.429568 15.545576 4.012428 3.760360
ROW17 0.168638 4.096091 -3.927453 -12.03563 -3.597167 3.765805 -0.158895 -0.006991 0.175261 -0.058475 -0.199729 0.332589 8.024856 7.892096 4.070620 4.012428 15.958476 6.047738
ROW18 -0.098804 3.158895 -3.257699 -9.054106 -3.320511 3.221706 -0.324369 0.134797 0.432314 -0.566577 0.039477 -0.318980 7.520720 4.574756 8.144164 3.760360 6.047738 15.832442

ginvlhs
6.110 8.914 -2.804 -9.306 3.087 3.022 -7.927 -2.329 -2.372 -3.728 -4.653 -6.467 0.279 0.058 -0.477 0.140 0.169 -0.099
8.914 50.884 -41.97 -24.46 -13.93 22.843 -16.42 4.213 -4.733 -10.72 -0.208 -11.33 5.020 3.172 1.298 2.510 4.096 3.159
-2.804 -41.97 39.166 15.150 17.017 -19.82 8.493 -6.542 2.362 6.997 -4.445 4.861 -4.741 -3.114 -1.775 -2.370 -3.927 -3.258
-9.306 -24.46 15.150 51.952 5.763 -15.07 3.936 1.226 -3.815 -1.710 -3.144 0.339 -12.36 -11.71 -5.749 -6.179 -12.04 -9.054
3.087 -13.93 17.017 5.763 18.849 -15.76 -6.817 -2.343 1.435 0.244 -9.072 -5.838 -3.671 -3.524 -2.970 -1.835 -3.597 -3.321
3.022 22.843 -19.82 -15.07 -15.76 18.784 -1.110 0.014 -3.807 -3.972 4.418 -0.629 3.950 3.582 2.493 1.975 3.766 3.222
-7.927 -16.42 8.493 3.936 -6.817 -1.110 33.110 0.544 3.523 14.924 16.380 19.558 -1.933 1.615 1.284 -0.967 -0.159 -0.324
-2.329 4.213 -6.542 1.226 -2.343 0.014 0.544 8.856 3.816 0.703 4.680 2.235 0.511 -0.525 -0.242 0.256 -0.007 0.135
-2.372 -4.733 2.362 -3.815 1.435 -3.807 3.523 3.816 18.195 3.812 4.163 9.490 2.430 -2.080 -1.566 1.215 0.175 0.432
-3.728 -10.72 6.997 -1.710 0.244 -3.972 14.924 0.703 3.812 18.853 7.649 9.825 -2.500 2.383 1.367 -1.250 -0.058 -0.567
-4.653 -0.208 -4.445 -3.144 -9.072 4.418 16.380 4.680 4.163 7.649 21.218 11.832 -0.641 0.242 0.720 -0.321 -0.200 0.039
-6.467 -11.33 4.861 0.339 -5.838 -0.629 19.558 2.235 9.490 9.825 11.832 27.550 0.054 0.611 -0.692 0.027 0.333 -0.319
0.279 5.020 -4.741 -12.36 -3.671 3.950 -1.933 0.511 2.430 -2.500 -0.641 0.054 14.182 1.867 0.859 7.091 8.025 7.521
0.058 3.172 -3.114 -11.71 -3.524 3.582 1.615 -0.525 -2.080 2.383 0.242 0.611 1.867 13.917 7.282 0.934 7.892 4.575
-0.477 1.298 -1.775 -5.749 -2.970 2.493 1.284 -0.242 -1.566 1.367 0.720 -0.692 0.859 7.282 15.429 0.430 4.071 8.144
0.140 2.510 -2.370 -6.179 -1.835 1.975 -0.967 0.256 1.215 -1.250 -0.321 0.027 7.091 0.934 0.430 15.546 4.012 3.760
0.169 4.096 -3.927 -12.04 -3.597 3.766 -0.159 -0.007 0.175 -0.058 -0.200 0.333 8.025 7.892 4.071 4.012 15.958 6.048
-0.099 3.159 -3.258 -9.054 -3.321 3.222 -0.324 0.135 0.432 -0.567 0.039 -0.319 7.521 4.575 8.144 3.760 6.048 15.832

Compute gl = ginvlhs*lhs = matrix of expectations of solutions

gl
0.500 0.250 0.250 -0.000 0.250 0.250 0.000 -0.000 0.000 -0.000 0.000 0.000 0.000 0.000 0.000 0.000 -0.000 0.000
0.250 0.625 -0.375 -0.000 0.125 0.125 0.000 -0.000 0.000 0.000 -0.000 0.000 -0.000 -0.000 0.000 0.000 -0.000 0.000
0.250 -0.375 0.625 0.000 0.125 0.125 -0.000 0.000 -0.000 0.000 0.000 -0.000 0.000 0.000 -0.000 -0.000 0.000 -0.000
-0.000 0.000 -0.000 1.000 0.000 -0.000 -0.000 0.000 -0.000 -0.000 -0.000 -0.000 0.000 0.000 -0.000 -0.000 -0.000 0.000
0.250 0.125 0.125 0.000 0.625 -0.375 0.000 -0.000 -0.000 -0.000 0.000 -0.000 0.000 0.000 -0.000 -0.000 -0.000 -0.000
0.250 0.125 0.125 0.000 -0.375 0.625 0.000 0.000 0.000 0.000 0.000 0.000 -0.000 -0.000 0.000 -0.000 0.000 0.000
0.000 0.000 -0.000 -0.000 0.000 -0.000 1.000 0.000 -0.000 -0.000 -0.000 -0.000 -0.000 0.000 0.000 -0.000 0.000 -0.000
0.000 0.000 0.000 -0.000 0.000 -0.000 0.000 1.000 -0.000 -0.000 0.000 0.000 0.000 0.000 -0.000 -0.000 0.000 -0.000
0.000 -0.000 0.000 0.000 -0.000 0.000 -0.000 -0.000 1.000 0.000 0.000 -0.000 0.000 0.000 -0.000 0.000 0.000 -0.000
0.000 0.000 0.000 -0.000 -0.000 0.000 -0.000 -0.000 0.000 1.000 0.000 -0.000 0.000 -0.000 0.000 0.000 -0.000 0.000
-0.000 -0.000 -0.000 -0.000 0.000 -0.000 0.000 0.000 -0.000 0.000 1.000 -0.000 -0.000 0.000 -0.000 -0.000 0.000 -0.000
0.000 -0.000 0.000 -0.000 0.000 0.000 -0.000 0.000 -0.000 -0.000 0.000 1.000 0.000 -0.000 0.000 -0.000 -0.000 0.000
0.000 0.000 0.000 0.000 -0.000 0.000 0.000 0.000 0.000 0.000 -0.000 0.000 1.000 0.000 -0.000 0.000 0.000 -0.000
0.000 0.000 0.000 0.000 -0.000 0.000 0.000 0.000 0.000 -0.000 0.000 -0.000 0.000 1.000 0.000 -0.000 -0.000 0.000
0.000 -0.000 0.000 0.000 -0.000 0.000 0.000 0.000 -0.000 -0.000 0.000 -0.000 0.000 -0.000 1.000 -0.000 -0.000 0.000
0.000 -0.000 0.000 -0.000 -0.000 0.000 0.000 -0.000 0.000 -0.000 0.000 -0.000 -0.000 -0.000 0.000 1.000 -0.000 0.000
0.000 0.000 0.000 0.000 -0.000 0.000 0.000 0.000 0.000 0.000 -0.000 0.000 0.000 0.000 -0.000 0.000 1.000 -0.000
0.000 0.000 0.000 0.000 -0.000 0.000 0.000 0.000 -0.000 0.000 -0.000 0.000 -0.000 0.000 0.000 0.000 -0.000 1.000

Notice that lg = gl (i.e., lhs*ginvlhs = lhs*ginvlhs)

lg
0.500 0.250 0.250 0.000 0.250 0.250 0.000 -0.000 0.000 -0.000 0.000 0.000 0.000 -0.000 0.000 -0.000 -0.000 0.000
0.250 0.625 -0.375 -0.000 0.125 0.125 0.000 -0.000 0.000 -0.000 0.000 0.000 0.000 -0.000 0.000 0.000 -0.000 0.000
0.250 -0.375 0.625 0.000 0.125 0.125 -0.000 0.000 -0.000 0.000 0.000 0.000 -0.000 0.000 -0.000 -0.000 0.000 -0.000
0.000 0.000 -0.000 1.000 0.000 0.000 -0.000 0.000 -0.000 -0.000 -0.000 -0.000 0.000 0.000 0.000 0.000 -0.000 0.000
0.250 0.125 0.125 -0.000 0.625 -0.375 -0.000 -0.000 -0.000 -0.000 -0.000 -0.000 0.000 -0.000 0.000 0.000 -0.000 0.000
0.250 0.125 0.125 0.000 -0.375 0.625 0.000 -0.000 0.000 0.000 0.000 0.000 -0.000 0.000 0.000 -0.000 -0.000 -0.000
-0.000 0.000 -0.000 -0.000 0.000 0.000 1.000 -0.000 0.000 -0.000 -0.000 -0.000 -0.000 0.000 0.000 0.000 0.000 0.000
0.000 -0.000 0.000 -0.000 0.000 -0.000 0.000 1.000 -0.000 0.000 0.000 0.000 0.000 0.000 -0.000 -0.000 0.000 -0.000
-0.000 -0.000 0.000 0.000 0.000 0.000 0.000 -0.000 1.000 0.000 -0.000 0.000 0.000 0.000 -0.000 0.000 0.000 -0.000
0.000 0.000 -0.000 -0.000 -0.000 0.000 -0.000 -0.000 0.000 1.000 0.000 -0.000 -0.000 -0.000 0.000 0.000 -0.000 0.000
-0.000 0.000 -0.000 0.000 0.000 -0.000 -0.000 0.000 -0.000 0.000 1.000 -0.000 0.000 0.000 -0.000 -0.000 0.000 -0.000
-0.000 0.000 0.000 -0.000 -0.000 0.000 0.000 -0.000 -0.000 -0.000 0.000 1.000 -0.000 -0.000 0.000 -0.000 -0.000 0.000
0.000 0.000 -0.000 -0.000 -0.000 0.000 -0.000 0.000 -0.000 0.000 -0.000 0.000 1.000 0.000 0.000 0.000 0.000 -0.000
0.000 0.000 -0.000 0.000 -0.000 0.000 0.000 0.000 -0.000 -0.000 0.000 -0.000 0.000 1.000 0.000 -0.000 -0.000 0.000
-0.000 0.000 -0.000 -0.000 -0.000 0.000 0.000 0.000 0.000 -0.000 0.000 -0.000 0.000 -0.000 1.000 -0.000 -0.000 0.000
0.000 -0.000 0.000 -0.000 -0.000 0.000 0.000 -0.000 0.000 -0.000 0.000 0.000 0.000 -0.000 0.000 1.000 -0.000 0.000
-0.000 -0.000 0.000 0.000 0.000 -0.000 0.000 0.000 -0.000 0.000 -0.000 0.000 -0.000 0.000 -0.000 0.000 1.000 -0.000
-0.000 -0.000 0.000 0.000 0.000 -0.000 0.000 -0.000 0.000 0.000 -0.000 0.000 -0.000 -0.000 -0.000 0.000 -0.000 1.000

Verify that lgl = lhs (i.e., lhs*ginvlhs*lhs = lhs => generalized inverse is correct)

lgl
0.196 0.083 0.114 0.103 0.072 0.124 0.020 0.063 0.031 0.031 0.031 0.021 0.072 0.062 0.011 -0.000 -0.000 -0.000
0.083 0.055 0.027 0.054 0.052 0.031 0.020 -0.000 0.015 0.015 0.015 0.016 0.039 0.031 0.008 0.000 -0.000 0.000
0.114 0.027 0.087 0.049 0.021 0.093 -0.000 0.063 0.015 0.015 0.015 0.005 0.033 0.031 0.003 -0.000 0.000 -0.000
0.103 0.054 0.049 0.098 0.041 0.062 0.000 0.000 0.031 0.031 0.031 0.011 0.067 0.062 0.005 0.000 -0.000 0.000
0.072 0.052 0.021 0.041 0.072 0.000 0.020 0.000 0.000 -0.000 0.031 0.021 0.041 0.031 0.011 0.000 -0.000 0.000
0.124 0.031 0.093 0.062 0.000 0.124 0.000 0.063 0.031 0.031 0.000 0.000 0.031 0.031 0.000 -0.000 -0.000 -0.000
0.020 0.020 -0.000 -0.000 0.020 -0.000 0.105 0.022 0.016 -0.037 -0.044 -0.032 -0.000 -0.000 0.000 0.000 0.000 -0.000
0.063 0.000 0.063 0.000 0.000 0.063 0.022 0.208 -0.025 0.000 -0.044 0.000 0.000 0.000 -0.000 -0.000 0.000 -0.000
0.031 0.015 0.015 0.031 -0.000 0.031 0.016 -0.025 0.096 0.000 -0.000 -0.032 0.000 0.031 -0.000 -0.000 0.000 -0.000
0.031 0.015 0.015 0.031 -0.000 0.031 -0.037 -0.000 0.000 0.105 0.000 0.000 0.031 -0.000 0.000 0.000 -0.000 0.000
0.031 0.015 0.015 0.031 0.031 -0.000 -0.044 -0.044 -0.000 0.000 0.120 -0.000 0.031 0.031 -0.000 -0.000 0.000 -0.000
0.021 0.016 0.005 0.011 0.021 0.000 -0.032 0.000 -0.032 -0.000 0.000 0.085 0.011 -0.000 0.011 -0.000 -0.000 0.000
0.072 0.039 0.033 0.067 0.041 0.031 0.000 0.000 0.000 0.031 0.031 0.011 0.213 0.062 0.037 -0.042 -0.063 -0.063
0.062 0.031 0.031 0.062 0.031 0.031 0.000 0.000 0.031 0.000 0.031 -0.000 0.062 0.176 -0.042 -0.000 -0.063 0.000
0.011 0.008 0.003 0.005 0.011 0.000 0.000 0.000 0.000 -0.000 0.000 0.011 0.037 -0.042 0.120 -0.000 -0.000 -0.062
0.000 -0.000 0.000 -0.000 -0.000 0.000 0.000 -0.000 0.000 -0.000 0.000 -0.000 -0.042 -0.000 0.000 0.083 -0.000 0.000
-0.000 -0.000 -0.000 0.000 0.000 -0.000 0.000 0.000 -0.000 0.000 -0.000 0.000 -0.063 -0.062 -0.000 0.000 0.125 -0.000
0.000 0.000 -0.000 0.000 0.000 -0.000 -0.000 0.000 -0.000 0.000 -0.000 0.000 -0.063 0.000 -0.063 0.000 -0.000 0.125

Compute ranklhs = rank of the MME = trace of ginvlhs*lhs

ranklhs
16

Compute yhat = vector of solutions for the MME

yhat
133.03327
71.465061
61.56821
8.4423449
82.490722
50.542549
0.9615933
-0.144029
-1.153807
0.9128845
0.6497047
-0.765336
0.5121041
-0.340781
-0.427375
0.2560521
0.0856614
0.0423646

yhat
133.03
71.47
61.57
8.44
82.49
50.54
0.96
-0.14
-1.15
0.91
0.65
-0.77
0.51
-0.34
-0.43
0.26
0.09
0.04

Compute sesol = standard error of solutions

sesol
2.47
7.13
6.26
7.21
4.34
4.33
5.75
2.98
4.27
4.34
4.61
5.25
3.77
3.73
3.93
3.94
3.99
3.98

Computation of Additive, Nonadditive, and Total Genetic Predictions

Using matrix computations

Define ka = coefficient matrix of additive genetic predictions

ka
  COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16 COL17 COL18
ROW1 0 1 -1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
ROW2 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
ROW3 0 0.5 -0.5 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
ROW4 0 0.5 -0.5 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
ROW5 0 0.5 -0.5 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
ROW6 0 0.75 -0.75 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0

ka
0.00 1.00 -1.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.50 -0.50 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.50 -0.50 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.50 -0.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.75 -0.75 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00

Compute kagl = ka*ginvlhs*lhs to check if functions in matrix ka are estimable

(kagl = ka if functions in ka are estimable)

kagl
-0.00 1.00 -1.00 -0.00 -0.00 0.00 1.00 -0.00 0.00 -0.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00
0.00 0.00 0.00 -0.00 0.00 -0.00 0.00 1.00 -0.00 -0.00 0.00 0.00 0.00 0.00 -0.00 -0.00 0.00 -0.00
-0.00 0.50 -0.50 -0.00 -0.00 0.00 0.00 -0.00 1.00 0.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 0.00 0.00
0.00 0.50 -0.50 -0.00 -0.00 0.00 0.00 -0.00 0.00 1.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00
-0.00 0.50 -0.50 -0.00 -0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 -0.00 -0.00 -0.00 0.00 0.00 0.00
0.00 0.75 -0.75 -0.00 -0.00 0.00 0.00 -0.00 0.00 -0.00 0.00 1.00 -0.00 -0.00 0.00 0.00 -0.00 0.00

difkaglka
-0.00 0.00 -0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00 -0.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00
0.00 0.00 0.00 -0.00 0.00 -0.00 0.00 0.00 -0.00 -0.00 0.00 0.00 0.00 0.00 -0.00 -0.00 0.00 -0.00
-0.00 0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00 0.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00 -0.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00
-0.00 0.00 -0.00 -0.00 -0.00 0.00 0.00 0.00 0.00 0.00 -0.00 0.00 -0.00 -0.00 -0.00 0.00 0.00 0.00
0.00 0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00 -0.00 0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00

Compute uaka = vector of multibreed additive genetic predictions

uaka
10.86
-0.14
3.79
5.86
5.60
6.66

Compute vepuaka = matrix of variance of errors of additive genetic predictions

vepuaka
157.27 11.30 70.97 71.74 95.16 115.18
11.30 8.86 9.19 6.08 10.06 10.30
70.97 9.19 54.60 34.90 46.23 61.32
71.74 6.08 34.90 44.63 44.40 53.69
95.16 10.06 46.23 44.40 68.95 72.16
115.18 10.30 61.32 53.69 72.16 101.14

Compute sepuaka = vector of standard errors of additive genetic predictions

sepuaka
12.54
2.98
7.39
6.68
8.30
10.06

Define kn = coefficient matrix of nonadditive genetic predictions

Assume that males will be mated to (1/2A 1/2B) females and viceversa

kn
  COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16 COL17 COL18
ROW1 0 0 0 0.5 0 0 0 0 0 0 0 0 0.5 0 0 0 0 0
ROW2 0 0 0 0.5 0 0 0 0 0 0 0 0 0 0.5 0 0 0 0
ROW3 0 0 0 0.5 0 0 0 0 0 0 0 0 0 0 0.5 0 0 0
ROW4 0 0 0 0.5 0 0 0 0 0 0 0 0 0 0 0 0.5 0 0
ROW5 0 0 0 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0
ROW6 0 0 0 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5

kn
0.00 0.00 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.50 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.50 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.50 0.00 0.00 0.00
0.00 0.00 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.50 0.00 0.00
0.00 0.00 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.50 0.00
0.00 0.00 0.00 0.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.50

Compute kngl = kn*ginvlhs*lhs to check if functions in matrix kn are estimable

(kngl = kn if functions in kn are estimable)

kngl
0.00 0.00 -0.00 0.50 0.00 -0.00 -0.00 0.00 -0.00 0.00 -0.00 -0.00 0.50 0.00 -0.00 0.00 -0.00 -0.00
0.00 0.00 0.00 0.50 0.00 -0.00 -0.00 0.00 -0.00 -0.00 0.00 -0.00 0.00 0.50 -0.00 -0.00 -0.00 0.00
0.00 -0.00 0.00 0.50 0.00 -0.00 -0.00 0.00 -0.00 -0.00 0.00 -0.00 0.00 0.00 0.50 -0.00 -0.00 0.00
0.00 -0.00 0.00 0.50 0.00 0.00 -0.00 -0.00 -0.00 -0.00 0.00 -0.00 -0.00 -0.00 0.00 0.50 -0.00 0.00
-0.00 0.00 -0.00 0.50 0.00 -0.00 -0.00 0.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00 0.50 -0.00
0.00 0.00 -0.00 0.50 0.00 -0.00 -0.00 0.00 -0.00 0.00 -0.00 -0.00 -0.00 0.00 -0.00 0.00 -0.00 0.50

difknglkn
0.00 0.00 -0.00 0.00 0.00 -0.00 -0.00 0.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00 -0.00 -0.00
0.00 0.00 0.00 0.00 0.00 -0.00 -0.00 0.00 -0.00 -0.00 0.00 -0.00 0.00 0.00 -0.00 -0.00 -0.00 0.00
0.00 -0.00 0.00 0.00 0.00 -0.00 -0.00 0.00 -0.00 -0.00 0.00 -0.00 0.00 0.00 0.00 -0.00 -0.00 0.00
0.00 -0.00 0.00 -0.00 0.00 0.00 -0.00 -0.00 -0.00 -0.00 0.00 -0.00 -0.00 -0.00 0.00 -0.00 -0.00 0.00
-0.00 0.00 -0.00 0.00 0.00 -0.00 -0.00 0.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00 -0.00 -0.00
0.00 0.00 -0.00 0.00 0.00 -0.00 -0.00 0.00 -0.00 0.00 -0.00 -0.00 -0.00 0.00 -0.00 0.00 -0.00 0.00

Compute uakn = vector of multibreed nonadditive genetic predictions

uakn
4.48
4.05
4.01
4.35
4.26
4.24

Compute vepuaks = matrix of variance of errors of nonadditive genetic predictions

vepuakn
10.35 7.44 8.68 10.13 8.90 9.51
7.44 10.61 10.44 8.75 9.02 8.94
8.68 10.44 13.97 10.11 9.56 11.32
10.13 8.75 10.11 13.78 9.44 10.12
8.90 9.02 9.56 9.44 10.96 9.23
9.51 8.94 11.32 10.12 9.23 12.42

Compute sepuakn = vector of standard errors of nonadditive genetic predictions

sepuakn
3.22
3.26
3.74
3.71
3.31
3.52

Define kt = coefficient matrix of total genetic predictions

Assume that males will be mated to (1/2A 1/2B) females and viceversa

kt
  COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16 COL17 COL18
ROW1 0 1 -1 0.5 0 0 1 0 0 0 0 0 0.5 0 0 0 0 0
ROW2 0 0 0 0.5 0 0 0 1 0 0 0 0 0 0.5 0 0 0 0
ROW3 0 0.5 -0.5 0.5 0 0 0 0 1 0 0 0 0 0 0.5 0 0 0
ROW4 0 0.5 -0.5 0.5 0 0 0 0 0 1 0 0 0 0 0 0.5 0 0
ROW5 0 0.5 -0.5 0.5 0 0 0 0 0 0 1 0 0 0 0 0 0.5 0
ROW6 0 0.75 -0.75 0.5 0 0 0 0 0 0 0 1 0 0 0 0 0 0.5

kt
0.00 1.00 -1.00 0.50 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.50 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.50 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.50 0.00 0.00 0.00 0.00
0.00 0.50 -0.50 0.50 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.50 0.00 0.00 0.00
0.00 0.50 -0.50 0.50 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.50 0.00 0.00
0.00 0.50 -0.50 0.50 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.50 0.00
0.00 0.75 -0.75 0.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.50

Compute ktgl = kt*ginvlhs*lhs to check if functions in matrix kt are estimable

(ktgl = kt if functions in kt are estimable)

ktgl
-0.00 1.00 -1.00 0.50 -0.00 0.00 1.00 0.00 0.00 0.00 -0.00 0.00 0.50 -0.00 0.00 0.00 -0.00 0.00
0.00 0.00 0.00 0.50 0.00 -0.00 -0.00 1.00 -0.00 -0.00 0.00 -0.00 0.00 0.50 -0.00 -0.00 0.00 -0.00
-0.00 0.50 -0.50 0.50 -0.00 0.00 0.00 -0.00 1.00 -0.00 -0.00 0.00 -0.00 -0.00 0.50 0.00 -0.00 0.00
0.00 0.50 -0.50 0.50 -0.00 0.00 0.00 -0.00 0.00 1.00 0.00 0.00 -0.00 -0.00 0.00 0.50 -0.00 0.00
-0.00 0.50 -0.50 0.50 -0.00 -0.00 0.00 0.00 -0.00 0.00 1.00 0.00 -0.00 0.00 -0.00 0.00 0.50 0.00
0.00 0.75 -0.75 0.50 -0.00 0.00 0.00 0.00 0.00 -0.00 -0.00 1.00 -0.00 -0.00 0.00 0.00 -0.00 0.50

difktglkt
-0.00 0.00 -0.00 -0.00 -0.00 0.00 0.00 0.00 0.00 0.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00
0.00 0.00 0.00 0.00 0.00 -0.00 -0.00 0.00 -0.00 -0.00 0.00 -0.00 0.00 0.00 -0.00 -0.00 0.00 -0.00
-0.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00 -0.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00
0.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00 -0.00 0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00
-0.00 0.00 -0.00 -0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00 -0.00 0.00 -0.00 0.00 -0.00 0.00 0.00 0.00
0.00 0.00 0.00 -0.00 -0.00 0.00 0.00 0.00 0.00 -0.00 -0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00 0.00

Compute uakt = vector of multibreed total genetic predictions

uakt
15.34
3.91
7.80
10.21
9.86
10.90

Compute vepuaks = matrix of variance of errors of total genetic predictions

vepuakt
139.79 5.72 55.83 56.42 80.79 98.91
5.72 20.17 8.85 7.58 9.91 7.90
55.83 8.85 44.92 25.73 35.73 48.78
56.42 7.58 25.73 38.09 34.65 41.53
80.79 9.91 35.73 34.65 60.78 60.03
98.91 7.90 48.78 41.53 60.03 88.68

Compute sepuakt = vector of standard errors of total genetic predictions

sepuakt
11.82
4.49
6.70
6.17
7.80
9.42