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_2_Animal multibreed_eqvar_res_uneqvar_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
0

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

veaa vebb veab
49 49 0

TRICK: make r=diag(ve=1) for models with common residual variance

r = matrix of residual covariances

r
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1

invr = inverse of matrix of residual covariances

invr
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1

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
1 1 1 1 1 1
1 0 0.5 0.5 0.5 0.75
0 1 0.5 0.5 0.5 0.25
0 0 1 1 1 0.5
1 0 0 0 1 1
0 1 1 1 0 0
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
0 0 0 1 1 0.5
0 0 1 0 1 0
0 0 0 0 0 0.5
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 6 3.25 2.75 3.5 3 3 1 1 1 1 1 1 2.5 2 0.5 0 0 0
ROW2 3.25 2.3125 0.9375 1.875 2.25 1 1 0 0.5 0.5 0.5 0.75 1.375 1 0.375 0 0 0
ROW3 2.75 0.9375 1.8125 1.625 0.75 2 0 1 0.5 0.5 0.5 0.25 1.125 1 0.125 0 0 0
ROW4 3.5 1.875 1.625 3.25 1.5 2 0 0 1 1 1 0.5 2.25 2 0.25 0 0 0
ROW5 3 2.25 0.75 1.5 3 0 1 0 0 0 1 1 1.5 1 0.5 0 0 0
ROW6 3 1 2 2 0 3 0 1 1 1 0 0 1 1 0 0 0 0
ROW7 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0
ROW8 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0
ROW9 1 0.5 0.5 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0
ROW10 1 0.5 0.5 1 0 1 0 0 0 1 0 0 1 0 0 0 0 0
ROW11 1 0.5 0.5 1 1 0 0 0 0 0 1 0 1 1 0 0 0 0
ROW12 1 0.75 0.25 0.5 1 0 0 0 0 0 0 1 0.5 0 0.5 0 0 0
ROW13 2.5 1.375 1.125 2.25 1.5 1 0 0 0 1 1 0.5 2.25 1 0.25 0 0 0
ROW14 2 1 1 2 1 1 0 0 1 0 1 0 1 2 0 0 0 0
ROW15 0.5 0.375 0.125 0.25 0.5 0 0 0 0 0 0 0.5 0.25 0 0.25 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 6 3.25 2.75 3.5 3 3 1 1 1 1 1 1 2.5 2 0.5 0 0 0
ROW2 3.25 2.3125 0.9375 1.875 2.25 1 1 0 0.5 0.5 0.5 0.75 1.375 1 0.375 0 0 0
ROW3 2.75 0.9375 1.8125 1.625 0.75 2 0 1 0.5 0.5 0.5 0.25 1.125 1 0.125 0 0 0
ROW4 3.5 1.875 1.625 3.25 1.5 2 0 0 1 1 1 0.5 2.25 2 0.25 0 0 0
ROW5 3 2.25 0.75 1.5 3 0 1 0 0 0 1 1 1.5 1 0.5 0 0 0
ROW6 3 1 2 2 0 3 0 1 1 1 0 0 1 1 0 0 0 0
ROW7 1 1 0 0 1 0 5.1414074 1.0888889 0.784 -1.814815 -2.177778 -1.568 0 0 0 0 0 0
ROW8 1 0 1 0 0 1 1.0888889 8.1382716 -1.209877 0 -2.177778 0 0 0 0 0 0 0
ROW9 1 0.5 0.5 1 0 1 0.784 -1.209877 4.2037531 0 0 -1.568 0 1 0 0 0 0
ROW10 1 0.5 0.5 1 0 1 -1.814815 0 0 4.6296296 0 0 1 0 0 0 0 0
ROW11 1 0.5 0.5 1 1 0 -2.177778 -2.177778 0 0 5.3555556 0 1 1 0 0 0 0
ROW12 1 0.75 0.25 0.5 1 0 -1.568 0 -1.568 0 0 4.136 0.5 0 0.5 0 0 0
ROW13 2.5 1.375 1.125 2.25 1.5 1 0 0 0 1 1 0.5 9.3958333 2.53125 1.78125 -2.041667 -3.0625 -3.0625
ROW14 2 1 1 2 1 1 0 0 1 0 1 0 2.53125 7.6145833 -2.041667 0 -3.0625 0
ROW15 0.5 0.375 0.125 0.25 0.5 0 0 0 0 0 0 0.5 1.78125 -2.041667 5.8645833 0 0 -3.0625
ROW16 0 0 0 0 0 0 0 0 0 0 0 0 -2.041667 0 0 4.0833333 0 0
ROW17 0 0 0 0 0 0 0 0 0 0 0 0 -3.0625 -3.0625 0 0 6.125 0
ROW18 0 0 0 0 0 0 0 0 0 0 0 0 -3.0625 0 -3.0625 0 0 6.125

lhs
6.000 3.250 2.750 3.500 3.000 3.000 1.000 1.000 1.000 1.000 1.000 1.000 2.500 2.000 0.500 0.000 0.000 0.000
3.250 2.313 0.938 1.875 2.250 1.000 1.000 0.000 0.500 0.500 0.500 0.750 1.375 1.000 0.375 0.000 0.000 0.000
2.750 0.938 1.813 1.625 0.750 2.000 0.000 1.000 0.500 0.500 0.500 0.250 1.125 1.000 0.125 0.000 0.000 0.000
3.500 1.875 1.625 3.250 1.500 2.000 0.000 0.000 1.000 1.000 1.000 0.500 2.250 2.000 0.250 0.000 0.000 0.000
3.000 2.250 0.750 1.500 3.000 0.000 1.000 0.000 0.000 0.000 1.000 1.000 1.500 1.000 0.500 0.000 0.000 0.000
3.000 1.000 2.000 2.000 0.000 3.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 0.000 0.000 0.000 0.000
1.000 1.000 0.000 0.000 1.000 0.000 5.141 1.089 0.784 -1.815 -2.178 -1.568 0.000 0.000 0.000 0.000 0.000 0.000
1.000 0.000 1.000 0.000 0.000 1.000 1.089 8.138 -1.210 0.000 -2.178 0.000 0.000 0.000 0.000 0.000 0.000 0.000
1.000 0.500 0.500 1.000 0.000 1.000 0.784 -1.210 4.204 0.000 0.000 -1.568 0.000 1.000 0.000 0.000 0.000 0.000
1.000 0.500 0.500 1.000 0.000 1.000 -1.815 0.000 0.000 4.630 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000
1.000 0.500 0.500 1.000 1.000 0.000 -2.178 -2.178 0.000 0.000 5.356 0.000 1.000 1.000 0.000 0.000 0.000 0.000
1.000 0.750 0.250 0.500 1.000 0.000 -1.568 0.000 -1.568 0.000 0.000 4.136 0.500 0.000 0.500 0.000 0.000 0.000
2.500 1.375 1.125 2.250 1.500 1.000 0.000 0.000 0.000 1.000 1.000 0.500 9.396 2.531 1.781 -2.042 -3.063 -3.063
2.000 1.000 1.000 2.000 1.000 1.000 0.000 0.000 1.000 0.000 1.000 0.000 2.531 7.615 -2.042 0.000 -3.063 0.000
0.500 0.375 0.125 0.250 0.500 0.000 0.000 0.000 0.000 0.000 0.000 0.500 1.781 -2.042 5.865 0.000 0.000 -3.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 -2.042 0.000 0.000 4.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 -3.063 -3.063 0.000 0.000 6.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 -3.063 0.000 -3.063 0.000 0.000 6.125

Compute rhs = right hand side of the MME

rhs
1629
908
721
952
867
762
289
245
256
261
292
286
696
548
143
0
0
0

rhs
1629.0
908.00
721.00
952.00
867.00
762.00
289.00
245.00
256.00
261.00
292.00
286.00
696.00
548.00
143.00
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 0.167793 0.126577 0.041216 -0.281208 0.079556 0.088236 -0.163740 -0.047246 -0.046048 -0.077888 -0.096352 -0.130285 0.004719 0.001781 -0.008860 0.002359 0.003250 -0.002070
ROW2 0.126577 1.266360 -1.139783 -0.417773 -0.424776 0.551353 -0.346270 0.086853 -0.083601 -0.227062 -0.014199 -0.216919 0.099352 0.064421 0.031449 0.049676 0.081887 0.065400
ROW3 0.041216 -1.139783 1.180999 0.136566 0.504333 -0.463117 0.182531 -0.134099 0.037552 0.149174 -0.082153 0.086634 -0.094633 -0.062640 -0.040308 -0.047317 -0.078636 -0.067471
ROW4 -0.281208 -0.417773 0.136566 1.354706 0.099009 -0.380217 0.088466 0.024859 -0.087095 -0.030343 -0.055492 -0.006653 -0.251652 -0.236266 -0.120951 -0.125826 -0.243959 -0.186301
ROW5 0.079556 -0.424776 0.504333 0.099009 0.491153 -0.411596 -0.135932 -0.047293 0.025961 0.005034 -0.180005 -0.128327 -0.076746 -0.067744 -0.062035 -0.038373 -0.072245 -0.069391
ROW6 0.088236 0.551353 -0.463117 -0.380217 -0.411596 0.499833 -0.027808 0.000047 -0.072009 -0.082923 0.083654 -0.001958 0.081465 0.069525 0.053175 0.040733 0.075495 0.067320
ROW7 -0.163740 -0.346270 0.182531 0.088466 -0.135932 -0.027808 0.684474 0.009016 0.061006 0.315188 0.337898 0.397314 -0.032058 0.025767 0.022320 -0.016029 -0.003145 -0.004869
ROW8 -0.047246 0.086853 -0.134099 0.024859 -0.047293 0.000047 0.009016 0.181297 0.080505 0.011637 0.094851 0.045610 0.008449 -0.008667 -0.004007 0.004225 -0.000109 0.002221
ROW9 -0.046048 -0.083601 0.037552 -0.087095 0.025961 -0.072009 0.061006 0.080505 0.384886 0.064498 0.080555 0.195725 0.040290 -0.033322 -0.027114 0.020145 0.003484 0.006588
ROW10 -0.077888 -0.227062 0.149174 -0.030343 0.005034 -0.082923 0.315188 0.011637 0.064498 0.398192 0.159906 0.199582 -0.041377 0.038884 0.023182 -0.020688 -0.001247 -0.009098
ROW11 -0.096352 -0.014199 -0.082153 -0.055492 -0.180005 0.083654 0.337898 0.094851 0.080555 0.159906 0.435097 0.239420 -0.010718 0.002988 0.013088 -0.005359 -0.003865 0.001185
ROW12 -0.130285 -0.216919 0.086634 -0.006653 -0.128327 -0.001958 0.397314 0.045610 0.195725 0.199582 0.239420 0.565514 0.001097 0.011673 -0.013319 0.000548 0.006385 -0.006111
ROW13 0.004719 0.099352 -0.094633 -0.251652 -0.076746 0.081465 -0.032058 0.008449 0.040290 -0.041377 -0.010718 0.001097 0.296489 0.030815 0.014248 0.148244 0.163652 0.155368
ROW14 0.001781 0.064421 -0.062640 -0.236266 -0.067744 0.069525 0.025767 -0.008667 -0.033322 0.038884 0.002988 0.011673 0.030815 0.291761 0.151813 0.015407 0.161288 0.091314
ROW15 -0.008860 0.031449 -0.040308 -0.120951 -0.062035 0.053175 0.022320 -0.004007 -0.027114 0.023182 0.013088 -0.013319 0.014248 0.151813 0.316611 0.007124 0.083031 0.165429
ROW16 0.002359 0.049676 -0.047317 -0.125826 -0.038373 0.040733 -0.016029 0.004225 0.020145 -0.020688 -0.005359 0.000548 0.148244 0.015407 0.007124 0.319020 0.081826 0.077684
ROW17 0.003250 0.081887 -0.078636 -0.243959 -0.072245 0.075495 -0.003145 -0.000109 0.003484 -0.001247 -0.003865 0.006385 0.163652 0.161288 0.083031 0.081826 0.325735 0.123341
ROW18 -0.002070 0.065400 -0.067471 -0.186301 -0.069391 0.067320 -0.004869 0.002221 0.006588 -0.009098 0.001185 -0.006111 0.155368 0.091314 0.165429 0.077684 0.123341 0.323664

ginvlhs
0.168 0.127 0.041 -0.281 0.080 0.088 -0.164 -0.047 -0.046 -0.078 -0.096 -0.130 0.005 0.002 -0.009 0.002 0.003 -0.002
0.127 1.266 -1.140 -0.418 -0.425 0.551 -0.346 0.087 -0.084 -0.227 -0.014 -0.217 0.099 0.064 0.031 0.050 0.082 0.065
0.041 -1.140 1.181 0.137 0.504 -0.463 0.183 -0.134 0.038 0.149 -0.082 0.087 -0.095 -0.063 -0.040 -0.047 -0.079 -0.067
-0.281 -0.418 0.137 1.355 0.099 -0.380 0.088 0.025 -0.087 -0.030 -0.055 -0.007 -0.252 -0.236 -0.121 -0.126 -0.244 -0.186
0.080 -0.425 0.504 0.099 0.491 -0.412 -0.136 -0.047 0.026 0.005 -0.180 -0.128 -0.077 -0.068 -0.062 -0.038 -0.072 -0.069
0.088 0.551 -0.463 -0.380 -0.412 0.500 -0.028 0.000 -0.072 -0.083 0.084 -0.002 0.081 0.070 0.053 0.041 0.075 0.067
-0.164 -0.346 0.183 0.088 -0.136 -0.028 0.684 0.009 0.061 0.315 0.338 0.397 -0.032 0.026 0.022 -0.016 -0.003 -0.005
-0.047 0.087 -0.134 0.025 -0.047 0.000 0.009 0.181 0.081 0.012 0.095 0.046 0.008 -0.009 -0.004 0.004 -0.000 0.002
-0.046 -0.084 0.038 -0.087 0.026 -0.072 0.061 0.081 0.385 0.064 0.081 0.196 0.040 -0.033 -0.027 0.020 0.003 0.007
-0.078 -0.227 0.149 -0.030 0.005 -0.083 0.315 0.012 0.064 0.398 0.160 0.200 -0.041 0.039 0.023 -0.021 -0.001 -0.009
-0.096 -0.014 -0.082 -0.055 -0.180 0.084 0.338 0.095 0.081 0.160 0.435 0.239 -0.011 0.003 0.013 -0.005 -0.004 0.001
-0.130 -0.217 0.087 -0.007 -0.128 -0.002 0.397 0.046 0.196 0.200 0.239 0.566 0.001 0.012 -0.013 0.001 0.006 -0.006
0.005 0.099 -0.095 -0.252 -0.077 0.081 -0.032 0.008 0.040 -0.041 -0.011 0.001 0.296 0.031 0.014 0.148 0.164 0.155
0.002 0.064 -0.063 -0.236 -0.068 0.070 0.026 -0.009 -0.033 0.039 0.003 0.012 0.031 0.292 0.152 0.015 0.161 0.091
-0.009 0.031 -0.040 -0.121 -0.062 0.053 0.022 -0.004 -0.027 0.023 0.013 -0.013 0.014 0.152 0.317 0.007 0.083 0.165
0.002 0.050 -0.047 -0.126 -0.038 0.041 -0.016 0.004 0.020 -0.021 -0.005 0.001 0.148 0.015 0.007 0.319 0.082 0.078
0.003 0.082 -0.079 -0.244 -0.072 0.075 -0.003 -0.000 0.003 -0.001 -0.004 0.006 0.164 0.161 0.083 0.082 0.326 0.123
-0.002 0.065 -0.067 -0.186 -0.069 0.067 -0.005 0.002 0.007 -0.009 0.001 -0.006 0.155 0.091 0.165 0.078 0.123 0.324

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
6.000 3.250 2.750 3.500 3.000 3.000 1.000 1.000 1.000 1.000 1.000 1.000 2.500 2.000 0.500 -0.000 -0.000 -0.000
3.250 2.313 0.938 1.875 2.250 1.000 1.000 0.000 0.500 0.500 0.500 0.750 1.375 1.000 0.375 -0.000 -0.000 -0.000
2.750 0.938 1.813 1.625 0.750 2.000 0.000 1.000 0.500 0.500 0.500 0.250 1.125 1.000 0.125 -0.000 -0.000 -0.000
3.500 1.875 1.625 3.250 1.500 2.000 -0.000 0.000 1.000 1.000 1.000 0.500 2.250 2.000 0.250 -0.000 -0.000 -0.000
3.000 2.250 0.750 1.500 3.000 -0.000 1.000 0.000 -0.000 -0.000 1.000 1.000 1.500 1.000 0.500 -0.000 -0.000 -0.000
3.000 1.000 2.000 2.000 0.000 3.000 0.000 1.000 1.000 1.000 0.000 -0.000 1.000 1.000 0.000 -0.000 -0.000 -0.000
1.000 1.000 -0.000 0.000 1.000 -0.000 5.141 1.089 0.784 -1.815 -2.178 -1.568 -0.000 -0.000 0.000 -0.000 0.000 -0.000
1.000 0.000 1.000 0.000 0.000 1.000 1.089 8.138 -1.210 0.000 -2.178 0.000 0.000 -0.000 0.000 -0.000 0.000 -0.000
1.000 0.500 0.500 1.000 -0.000 1.000 0.784 -1.210 4.204 0.000 -0.000 -1.568 0.000 1.000 -0.000 -0.000 -0.000 0.000
1.000 0.500 0.500 1.000 -0.000 1.000 -1.815 0.000 0.000 4.630 -0.000 -0.000 1.000 0.000 0.000 -0.000 -0.000 -0.000
1.000 0.500 0.500 1.000 1.000 0.000 -2.178 -2.178 -0.000 -0.000 5.356 -0.000 1.000 1.000 -0.000 -0.000 -0.000 0.000
1.000 0.750 0.250 0.500 1.000 -0.000 -1.568 -0.000 -1.568 -0.000 0.000 4.136 0.500 0.000 0.500 -0.000 -0.000 -0.000
2.500 1.375 1.125 2.250 1.500 1.000 0.000 -0.000 -0.000 1.000 1.000 0.500 9.396 2.531 1.781 -2.042 -3.062 -3.063
2.000 1.000 1.000 2.000 1.000 1.000 0.000 -0.000 1.000 0.000 1.000 -0.000 2.531 7.615 -2.042 -0.000 -3.063 -0.000
0.500 0.375 0.125 0.250 0.500 0.000 0.000 0.000 -0.000 -0.000 -0.000 0.500 1.781 -2.042 5.865 -0.000 0.000 -3.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 -2.042 0.000 0.000 4.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 -3.063 -3.063 -0.000 -0.000 6.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 -3.063 0.000 -3.063 0.000 -0.000 6.125

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

ranklhs
16

Compute yhat = vector of solutions for the MME

yhat
133.06942
71.700685
61.368738
8.2498597
82.390189
50.679235
0.8376792
-0.117397
-1.001088
0.7710314
0.5901973
-0.72075
0.4174125
-0.253817
-0.372302
0.2087062
0.0817978
0.0225553

yhat
133.07
71.70
61.37
8.25
82.39
50.68
0.84
-0.12
-1.00
0.77
0.59
-0.72
0.42
-0.25
-0.37
0.21
0.08
0.02

Compute sesol = standard error of solutions

sesol
2.87
7.88
7.61
8.15
4.91
4.95
5.79
2.98
4.34
4.42
4.62
5.26
3.81
3.78
3.94
3.95
4.00
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
11.17
-0.12
4.16
5.94
5.76
7.03

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

vepuaka
213.34 11.27 99.91 99.86 122.74 158.88
11.27 8.88 9.36 5.98 10.06 10.35
99.91 9.36 70.83 48.88 60.55 84.56
99.86 5.98 48.88 58.98 58.19 75.37
122.74 10.06 60.55 58.19 82.55 93.65
158.88 10.35 84.56 75.37 93.65 135.68

Compute sepuaka = vector of standard errors of additive genetic predictions

sepuaka
14.61
2.98
8.42
7.68
9.09
11.65

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.33
4.00
3.94
4.23
4.17
4.14

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

vepuakn
14.06 11.00 12.21 13.79 12.53 13.13
11.00 14.38 14.08 12.35 12.69 12.54
12.21 14.08 17.51 13.66 13.14 14.86
13.79 12.35 13.66 17.42 13.07 13.72
12.53 12.69 13.14 13.07 14.61 12.84
13.13 12.54 14.86 13.72 12.84 16.00

Compute sepuakn = vector of standard errors of nonadditive genetic predictions

sepuakn
3.75
3.79
4.18
4.17
3.82
4.00

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.50
3.88
8.10
10.17
9.92
11.16

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

vepuakt
212.50 15.41 97.44 98.05 121.67 156.97
15.41 24.06 15.76 14.02 16.84 15.83
97.44 15.76 70.92 49.21 59.87 82.92
98.05 14.02 49.21 62.70 58.56 74.41
121.67 16.84 59.87 58.56 84.61 92.75
156.97 15.83 82.92 74.41 92.75 135.57

Compute sepuakt = vector of standard errors of total genetic predictions

sepuakt
14.58
4.90
8.42
7.92
9.20
11.64