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_3_Animal multibreed_eqvar_res_add_uneqvar_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
0

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 36 0

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
36
36
36
36
36

Compute daf = vector of computed residual additive genetic variances

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

daf
36
36
27
27
18
18

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.0277778
0.037037
0.037037
0.0555556
0.0555556

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.0648148 0.0138889 0.0138889 -0.018519 -0.027778 -0.027778
0.0138889 0.0509259 -0.018519 0 -0.027778 0
0.0138889 -0.018519 0.0509259 0 0 -0.027778
-0.018519 0 0 0.037037 0 0
-0.027778 -0.027778 0 0 0.0555556 0
-0.027778 0 -0.027778 0 0 0.0555556

gainv
0.065 0.014 0.014 -0.019 -0.028 -0.028
0.014 0.051 -0.019 0.000 -0.028 0.000
0.014 -0.019 0.051 0.000 0.000 -0.028
-0.019 0.000 0.000 0.037 0.000 0.000
-0.028 -0.028 0.000 0.000 0.056 0.000
-0.028 0.000 -0.028 0.000 0.000 0.056

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 4.1759259 0.6805556 0.6805556 -0.907407 -1.361111 -1.361111 0 0 0 0 0 0
ROW8 1 0 1 0 0 1 0.6805556 3.4953704 -0.907407 0 -1.361111 0 0 0 0 0 0 0
ROW9 1 0.5 0.5 1 0 1 0.6805556 -0.907407 3.4953704 0 0 -1.361111 0 1 0 0 0 0
ROW10 1 0.5 0.5 1 0 1 -0.907407 0 0 2.8148148 0 0 1 0 0 0 0 0
ROW11 1 0.5 0.5 1 1 0 -1.361111 -1.361111 0 0 3.7222222 0 1 1 0 0 0 0
ROW12 1 0.75 0.25 0.5 1 0 -1.361111 0 -1.361111 0 0 3.7222222 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 4.176 0.681 0.681 -0.907 -1.361 -1.361 0.000 0.000 0.000 0.000 0.000 0.000
1.000 0.000 1.000 0.000 0.000 1.000 0.681 3.495 -0.907 0.000 -1.361 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.681 -0.907 3.495 0.000 0.000 -1.361 0.000 1.000 0.000 0.000 0.000 0.000
1.000 0.500 0.500 1.000 0.000 1.000 -0.907 0.000 0.000 2.815 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 -1.361 -1.361 0.000 0.000 3.722 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.361 0.000 -1.361 0.000 0.000 3.722 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.203586 0.066550 0.137036 -0.300665 0.112509 0.091077 -0.171408 -0.181700 -0.109248 -0.088665 -0.162315 -0.168807 -0.001754 0.008083 -0.005451 -0.000877 0.003164 -0.003603
ROW2 0.066550 1.441156 -1.374605 -0.393957 -0.532495 0.599045 -0.338362 0.334010 -0.014227 -0.256930 0.177145 -0.167590 0.111266 0.050065 0.027934 0.055633 0.080665 0.069600
ROW3 0.137036 -1.374605 1.511641 0.093293 0.645004 -0.507968 0.166954 -0.515709 -0.095021 0.168266 -0.339459 -0.001217 -0.113020 -0.041982 -0.033386 -0.056510 -0.077501 -0.073203
ROW4 -0.300665 -0.393957 0.093293 1.424320 0.084507 -0.385171 0.096230 0.092544 -0.098074 -0.090700 -0.084186 -0.011123 -0.245526 -0.242003 -0.124402 -0.122763 -0.243764 -0.184964
ROW5 0.112509 -0.532495 0.645004 0.084507 0.567579 -0.455070 -0.144955 -0.177443 -0.009044 0.055932 -0.299923 -0.166898 -0.087171 -0.056117 -0.058025 -0.043585 -0.071644 -0.072598
ROW6 0.091077 0.599045 -0.507968 -0.385171 -0.455070 0.546147 -0.026453 -0.004257 -0.100204 -0.144596 0.137608 -0.001908 0.085417 0.064200 0.052573 0.042708 0.074808 0.068995
ROW7 -0.171408 -0.338362 0.166954 0.096230 -0.144955 -0.026453 0.690606 0.030907 0.081585 0.298943 0.347576 0.412457 -0.027473 0.021615 0.019595 -0.013736 -0.002929 -0.003939
ROW8 -0.181700 0.334010 -0.515709 0.092544 -0.177443 -0.004257 0.030907 0.701666 0.304473 0.064995 0.364165 0.171932 0.029358 -0.030301 -0.013736 0.014679 -0.000471 0.007811
ROW9 -0.109248 -0.014227 -0.095021 -0.098074 -0.009044 -0.100204 0.081585 0.304473 0.580879 0.135104 0.211740 0.293811 0.055888 -0.047572 -0.036260 0.027944 0.004158 0.009814
ROW10 -0.088665 -0.256930 0.168266 -0.090700 0.055932 -0.144596 0.298943 0.064995 0.135104 0.602999 0.178560 0.223841 -0.057774 0.056259 0.030402 -0.028887 -0.000758 -0.013686
ROW11 -0.162315 0.177145 -0.339459 -0.084186 -0.299923 0.137608 0.347576 0.364165 0.211740 0.178560 0.700265 0.325563 0.002828 -0.013029 0.008787 0.001414 -0.005101 0.005808
ROW12 -0.168807 -0.167590 -0.001217 -0.011123 -0.166898 -0.001908 0.412457 0.171932 0.293811 0.223841 0.325563 0.653743 0.010437 0.004394 -0.020049 0.005218 0.007415 -0.004806
ROW13 -0.001754 0.111266 -0.113020 -0.245526 -0.087171 0.085417 -0.027473 0.029358 0.055888 -0.057774 0.002828 0.010437 0.300434 0.026934 0.012210 0.150217 0.163684 0.156322
ROW14 0.008083 0.050065 -0.041982 -0.242003 -0.056117 0.064200 0.021615 -0.030301 -0.047572 0.056259 -0.013029 0.004394 0.026934 0.295736 0.153659 0.013467 0.161335 0.090296
ROW15 -0.005451 0.027934 -0.033386 -0.124402 -0.058025 0.052573 0.019595 -0.013736 -0.036260 0.030402 0.008787 -0.020049 0.012210 0.153659 0.317822 0.006105 0.082934 0.165016
ROW16 -0.000877 0.055633 -0.056510 -0.122763 -0.043585 0.042708 -0.013736 0.014679 0.027944 -0.028887 0.001414 0.005218 0.150217 0.013467 0.006105 0.320007 0.081842 0.078161
ROW17 0.003164 0.080665 -0.077501 -0.243764 -0.071644 0.074808 -0.002929 -0.000471 0.004158 -0.000758 -0.005101 0.007415 0.163684 0.161335 0.082934 0.081842 0.325775 0.123309
ROW18 -0.003603 0.069600 -0.073203 -0.184964 -0.072598 0.068995 -0.003939 0.007811 0.009814 -0.013686 0.005808 -0.004806 0.156322 0.090296 0.165016 0.078161 0.123309 0.323934

ginvlhs
0.204 0.067 0.137 -0.301 0.113 0.091 -0.171 -0.182 -0.109 -0.089 -0.162 -0.169 -0.002 0.008 -0.005 -0.001 0.003 -0.004
0.067 1.441 -1.375 -0.394 -0.532 0.599 -0.338 0.334 -0.014 -0.257 0.177 -0.168 0.111 0.050 0.028 0.056 0.081 0.070
0.137 -1.375 1.512 0.093 0.645 -0.508 0.167 -0.516 -0.095 0.168 -0.339 -0.001 -0.113 -0.042 -0.033 -0.057 -0.078 -0.073
-0.301 -0.394 0.093 1.424 0.085 -0.385 0.096 0.093 -0.098 -0.091 -0.084 -0.011 -0.246 -0.242 -0.124 -0.123 -0.244 -0.185
0.113 -0.532 0.645 0.085 0.568 -0.455 -0.145 -0.177 -0.009 0.056 -0.300 -0.167 -0.087 -0.056 -0.058 -0.044 -0.072 -0.073
0.091 0.599 -0.508 -0.385 -0.455 0.546 -0.026 -0.004 -0.100 -0.145 0.138 -0.002 0.085 0.064 0.053 0.043 0.075 0.069
-0.171 -0.338 0.167 0.096 -0.145 -0.026 0.691 0.031 0.082 0.299 0.348 0.412 -0.027 0.022 0.020 -0.014 -0.003 -0.004
-0.182 0.334 -0.516 0.093 -0.177 -0.004 0.031 0.702 0.304 0.065 0.364 0.172 0.029 -0.030 -0.014 0.015 -0.000 0.008
-0.109 -0.014 -0.095 -0.098 -0.009 -0.100 0.082 0.304 0.581 0.135 0.212 0.294 0.056 -0.048 -0.036 0.028 0.004 0.010
-0.089 -0.257 0.168 -0.091 0.056 -0.145 0.299 0.065 0.135 0.603 0.179 0.224 -0.058 0.056 0.030 -0.029 -0.001 -0.014
-0.162 0.177 -0.339 -0.084 -0.300 0.138 0.348 0.364 0.212 0.179 0.700 0.326 0.003 -0.013 0.009 0.001 -0.005 0.006
-0.169 -0.168 -0.001 -0.011 -0.167 -0.002 0.412 0.172 0.294 0.224 0.326 0.654 0.010 0.004 -0.020 0.005 0.007 -0.005
-0.002 0.111 -0.113 -0.246 -0.087 0.085 -0.027 0.029 0.056 -0.058 0.003 0.010 0.300 0.027 0.012 0.150 0.164 0.156
0.008 0.050 -0.042 -0.242 -0.056 0.064 0.022 -0.030 -0.048 0.056 -0.013 0.004 0.027 0.296 0.154 0.013 0.161 0.090
-0.005 0.028 -0.033 -0.124 -0.058 0.053 0.020 -0.014 -0.036 0.030 0.009 -0.020 0.012 0.154 0.318 0.006 0.083 0.165
-0.001 0.056 -0.057 -0.123 -0.044 0.043 -0.014 0.015 0.028 -0.029 0.001 0.005 0.150 0.013 0.006 0.320 0.082 0.078
0.003 0.081 -0.078 -0.244 -0.072 0.075 -0.003 -0.000 0.004 -0.001 -0.005 0.007 0.164 0.161 0.083 0.082 0.326 0.123
-0.004 0.070 -0.073 -0.185 -0.073 0.069 -0.004 0.008 0.010 -0.014 0.006 -0.005 0.156 0.090 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.937 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.937 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 4.176 0.681 0.681 -0.907 -1.361 -1.361 0.000 -0.000 0.000 -0.000 -0.000 0.000
1.000 0.000 1.000 -0.000 0.000 1.000 0.681 3.495 -0.907 -0.000 -1.361 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.681 -0.907 3.495 0.000 0.000 -1.361 0.000 1.000 0.000 -0.000 0.000 -0.000
1.000 0.500 0.500 1.000 -0.000 1.000 -0.907 -0.000 0.000 2.815 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 -1.361 -1.361 0.000 -0.000 3.722 -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.361 0.000 -1.361 0.000 -0.000 3.722 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.062
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.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 -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.062 -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.062 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.178
71.652882
61.525121
8.1346577
82.483546
50.694457
0.7436074
-0.39758
-1.314201
0.9681743
0.5190404
-0.977351
0.3534048
-0.199615
-0.330492
0.1767024
0.0768949
0.0114563

yhat
133.18
71.65
61.53
8.13
82.48
50.69
0.74
-0.40
-1.31
0.97
0.52
-0.98
0.35
-0.20
-0.33
0.18
0.08
0.01

Compute sesol = standard error of solutions

sesol
3.16
8.40
8.61
8.35
5.27
5.17
5.82
5.86
5.34
5.44
5.86
5.66
3.84
3.81
3.95
3.96
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
10.87
-0.40
3.75
6.03
5.58
6.62

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

vepuaka
263.72 43.15 135.28 121.13 169.66 203.04
43.15 34.38 35.74 24.00 38.66 39.65
135.28 35.74 102.27 68.03 94.86 118.06
121.13 24.00 68.03 78.56 80.84 96.04
169.66 38.66 94.86 80.84 129.48 135.64
203.04 39.65 118.06 96.04 135.64 176.97

Compute sepuaka = vector of standard errors of additive genetic predictions

sepuaka
16.24
5.86
10.11
8.86
11.38
13.30

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.24
3.97
3.90
4.16
4.11
4.07

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

vepuakn
15.11 11.81 13.07 14.78 13.46 14.09
11.81 15.14 14.84 13.14 13.47 13.32
13.07 14.84 18.29 14.49 13.95 15.68
14.78 13.14 14.49 18.36 13.96 14.64
13.46 13.47 13.95 13.96 15.47 13.71
14.09 13.32 15.68 14.64 13.71 16.88

Compute sepuakn = vector of standard errors of nonadditive genetic predictions

sepuakn
3.89
3.89
4.28
4.28
3.93
4.11

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.12
3.57
7.65
10.19
9.69
10.69

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

vepuakt
269.31 51.15 136.49 121.88 172.13 206.10
51.15 52.57 44.10 34.09 47.17 48.01
136.49 44.10 103.55 69.52 95.42 118.77
121.88 34.09 69.52 81.87 81.90 96.86
172.13 47.17 95.42 81.90 132.50 137.07
206.10 48.01 118.77 96.86 137.07 180.41

Compute sepuakt = vector of standard errors of total genetic predictions

sepuakt
16.41
7.25
10.18
9.05
11.51
13.43