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_4_Animal multibreed_eqvar_res_add_NPnaddEff_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
0

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
12

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
1 1 0 0 1 0 0 0 0 0 0 0
1 0 1 0 0 1 0 0 0 0 0 0
1 0.5 0.5 1 0 1 0 0 0 0 0 0
1 0.5 0.5 1 0 1 0 0 0 0 0 0
1 0.5 0.5 1 1 0 0 0 0 0 0 0
1 0.75 0.25 0.5 1 0 0 0 0 0 0 0

Construct random additive genetic effects in matrix xf

xf
1 1 0 0 1 0 1 0 0 0 0 0
1 0 1 0 0 1 0 1 0 0 0 0
1 0.5 0.5 1 0 1 0 0 1 0 0 0
1 0.5 0.5 1 0 1 0 0 0 1 0 0
1 0.5 0.5 1 1 0 0 0 0 0 1 0
1 0.75 0.25 0.5 1 0 0 0 0 0 0 1

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

x
1 1 0 0 1 0 1 0 0 0 0 0
1 0 1 0 0 1 0 1 0 0 0 0
1 0.5 0.5 1 0 1 0 0 1 0 0 0
1 0.5 0.5 1 0 1 0 0 0 1 0 0
1 0.5 0.5 1 1 0 0 0 0 0 1 0
1 0.75 0.25 0.5 1 0 0 0 0 0 0 1

Residual variance = veaa + vnab for model without random nonadditive effects

veaa vebb veab
65 65 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

Compute xtinvr = x transpose times r times x

xtinvrx
6 3.25 2.75 3.5 3 3 1 1 1 1 1 1
3.25 2.3125 0.9375 1.875 2.25 1 1 0 0.5 0.5 0.5 0.75
2.75 0.9375 1.8125 1.625 0.75 2 0 1 0.5 0.5 0.5 0.25
3.5 1.875 1.625 3.25 1.5 2 0 0 1 1 1 0.5
3 2.25 0.75 1.5 3 0 1 0 0 0 1 1
3 1 2 2 0 3 0 1 1 1 0 0
1 1 0 0 1 0 1 0 0 0 0 0
1 0 1 0 0 1 0 1 0 0 0 0
1 0.5 0.5 1 0 1 0 0 1 0 0 0
1 0.5 0.5 1 0 1 0 0 0 1 0 0
1 0.5 0.5 1 1 0 0 0 0 0 1 0
1 0.75 0.25 0.5 1 0 0 0 0 0 0 1

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

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 lhs = left hand side of the MME

Add gainv to lhs

lhs
6 3.25 2.75 3.5 3 3 1 1 1 1 1 1
3.25 2.3125 0.9375 1.875 2.25 1 1 0 0.5 0.5 0.5 0.75
2.75 0.9375 1.8125 1.625 0.75 2 0 1 0.5 0.5 0.5 0.25
3.5 1.875 1.625 3.25 1.5 2 0 0 1 1 1 0.5
3 2.25 0.75 1.5 3 0 1 0 0 0 1 1
3 1 2 2 0 3 0 1 1 1 0 0
1 1 0 0 1 0 5.212963 0.9027778 0.9027778 -1.203704 -1.805556 -1.805556
1 0 1 0 0 1 0.9027778 4.3101852 -1.203704 0 -1.805556 0
1 0.5 0.5 1 0 1 0.9027778 -1.203704 4.3101852 0 0 -1.805556
1 0.5 0.5 1 0 1 -1.203704 0 0 3.4074074 0 0
1 0.5 0.5 1 1 0 -1.805556 -1.805556 0 0 4.6111111 0
1 0.75 0.25 0.5 1 0 -1.805556 0 -1.805556 0 0 4.6111111

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
3.250 2.313 0.938 1.875 2.250 1.000 1.000 0.000 0.500 0.500 0.500 0.750
2.750 0.938 1.813 1.625 0.750 2.000 0.000 1.000 0.500 0.500 0.500 0.250
3.500 1.875 1.625 3.250 1.500 2.000 0.000 0.000 1.000 1.000 1.000 0.500
3.000 2.250 0.750 1.500 3.000 0.000 1.000 0.000 0.000 0.000 1.000 1.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 1.000 0.000 5.213 0.903 0.903 -1.204 -1.806 -1.806
1.000 0.000 1.000 0.000 0.000 1.000 0.903 4.310 -1.204 0.000 -1.806 0.000
1.000 0.500 0.500 1.000 0.000 1.000 0.903 -1.204 4.310 0.000 0.000 -1.806
1.000 0.500 0.500 1.000 0.000 1.000 -1.204 0.000 0.000 3.407 0.000 0.000
1.000 0.500 0.500 1.000 1.000 0.000 -1.806 -1.806 0.000 0.000 4.611 0.000
1.000 0.750 0.250 0.500 1.000 0.000 -1.806 0.000 -1.806 0.000 0.000 4.611

Compute rhs = right hand side of the MME

rhs
1629
908
721
952
867
762
289
245
256
261
292
286

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

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

ginvlhs
0.181232 0.063648 0.117584 -0.284615 0.093595 0.087636 -0.129195 -0.136452 -0.082126 -0.067612 -0.121547 -0.128213
0.063648 1.279549 -1.215901 -0.267308 -0.461535 0.525183 -0.253065 0.252069 -0.013598 -0.193098 0.136967 -0.131340
0.117584 -1.215901 1.333485 -0.017308 0.555131 -0.437547 0.123870 -0.388521 -0.068528 0.125486 -0.258515 0.003127
-0.284615 -0.267308 -0.017308 1.013462 -0.017308 -0.267308 0.069231 0.069231 -0.069231 -0.069231 -0.069231 0.000000
0.093595 -0.461535 0.555131 -0.017308 0.484756 -0.391160 -0.111276 -0.132566 -0.003215 0.039365 -0.227301 -0.123408
0.087636 0.525183 -0.437547 -0.267308 -0.391160 0.478797 -0.017919 -0.003886 -0.078911 -0.106977 0.105754 -0.004805
-0.129195 -0.253065 0.123870 0.069231 -0.111276 -0.017919 0.522564 0.023244 0.058545 0.226416 0.264865 0.306631
-0.136452 0.252069 -0.388521 0.069231 -0.132566 -0.003886 0.023244 0.528859 0.229564 0.049102 0.274308 0.129890
-0.082126 -0.013598 -0.068528 -0.069231 -0.003215 -0.078911 0.058545 0.229564 0.442349 0.100311 0.155241 0.228075
-0.067612 -0.193098 0.125486 -0.069231 0.039365 -0.106977 0.226416 0.049102 0.100311 0.454939 0.136355 0.166172
-0.121547 0.136967 -0.258515 -0.069231 -0.227301 0.105754 0.264865 0.274308 0.155241 0.136355 0.531837 0.239398
-0.128213 -0.131340 0.003127 0.000000 -0.123408 -0.004805 0.306631 0.129890 0.228075 0.166172 0.239398 0.502002

ginvlhs
0.181 0.064 0.118 -0.285 0.094 0.088 -0.129 -0.136 -0.082 -0.068 -0.122 -0.128
0.064 1.280 -1.216 -0.267 -0.462 0.525 -0.253 0.252 -0.014 -0.193 0.137 -0.131
0.118 -1.216 1.333 -0.017 0.555 -0.438 0.124 -0.389 -0.069 0.125 -0.259 0.003
-0.285 -0.267 -0.017 1.013 -0.017 -0.267 0.069 0.069 -0.069 -0.069 -0.069 0.000
0.094 -0.462 0.555 -0.017 0.485 -0.391 -0.111 -0.133 -0.003 0.039 -0.227 -0.123
0.088 0.525 -0.438 -0.267 -0.391 0.479 -0.018 -0.004 -0.079 -0.107 0.106 -0.005
-0.129 -0.253 0.124 0.069 -0.111 -0.018 0.523 0.023 0.059 0.226 0.265 0.307
-0.136 0.252 -0.389 0.069 -0.133 -0.004 0.023 0.529 0.230 0.049 0.274 0.130
-0.082 -0.014 -0.069 -0.069 -0.003 -0.079 0.059 0.230 0.442 0.100 0.155 0.228
-0.068 -0.193 0.125 -0.069 0.039 -0.107 0.226 0.049 0.100 0.455 0.136 0.166
-0.122 0.137 -0.259 -0.069 -0.227 0.106 0.265 0.274 0.155 0.136 0.532 0.239
-0.128 -0.131 0.003 0.000 -0.123 -0.005 0.307 0.130 0.228 0.166 0.239 0.502

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.250 0.625 -0.375 -0.000 0.125 0.125 -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 1.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.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 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 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 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 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 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 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.250 0.625 -0.375 0.000 0.125 0.125 -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 1.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.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 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 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 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 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 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 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
3.250 2.313 0.938 1.875 2.250 1.000 1.000 -0.000 0.500 0.500 0.500 0.750
2.750 0.937 1.813 1.625 0.750 2.000 0.000 1.000 0.500 0.500 0.500 0.250
3.500 1.875 1.625 3.250 1.500 2.000 -0.000 0.000 1.000 1.000 1.000 0.500
3.000 2.250 0.750 1.500 3.000 0.000 1.000 0.000 0.000 0.000 1.000 1.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 1.000 0.000 5.213 0.903 0.903 -1.204 -1.806 -1.806
1.000 -0.000 1.000 0.000 -0.000 1.000 0.903 4.310 -1.204 0.000 -1.806 -0.000
1.000 0.500 0.500 1.000 -0.000 1.000 0.903 -1.204 4.310 0.000 -0.000 -1.806
1.000 0.500 0.500 1.000 -0.000 1.000 -1.204 -0.000 0.000 3.407 -0.000 0.000
1.000 0.500 0.500 1.000 1.000 0.000 -1.806 -1.806 -0.000 -0.000 4.611 -0.000
1.000 0.750 0.250 0.500 1.000 -0.000 -1.806 -0.000 -1.806 -0.000 0.000 4.611

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

ranklhs
10

Compute yhat = vector of solutions for the MME

yhat
133.16981
71.583622
61.586187
8.25
82.531308
50.638501
0.680928
-0.394498
-1.218641
0.9322103
0.4296456
-0.841717

yhat
133.17
71.58
61.59
8.25
82.53
50.64
0.68
-0.39
-1.22
0.93
0.43
-0.84

Compute sesol = standard error of solutions

sesol
3.43
9.12
9.31
8.12
5.61
5.58
5.83
5.86
5.36
5.44
5.88
5.71

Computation of Additive, Nonadditive, and Total Genetic Predictions

Using matrix computations

Define ka = coefficient matrix of additive genetic predictions

ka
0 1 -1 0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0
0 0.5 -0.5 0 0 0 0 0 1 0 0 0
0 0.5 -0.5 0 0 0 0 0 0 1 0 0
0 0.5 -0.5 0 0 0 0 0 0 0 1 0
0 0.75 -0.75 0 0 0 0 0 0 0 0 1

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 1.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.50 -0.50 0.00 0.00 0.00 0.00 0.00 0.00 1.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.75 -0.75 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.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 1.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.50 -0.50 -0.00 0.00 -0.00 -0.00 -0.00 -0.00 1.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.75 -0.75 -0.00 0.00 -0.00 -0.00 -0.00 -0.00 -0.00 -0.00 1.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

Compute uaka = vector of multibreed additive genetic predictions

uaka
10.68
-0.39
3.78
5.93
5.43
6.66

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

vepuaka
312.88 43.15 159.08 145.72 194.63 238.75
43.15 34.38 35.74 24.01 38.65 39.67
159.08 35.74 114.30 79.93 106.71 136.10
145.72 24.01 79.93 90.84 93.34 113.87
194.63 38.65 106.71 93.34 142.25 153.44
238.75 39.67 136.10 113.87 153.44 203.97

Compute sepuaka = vector of standard errors of additive genetic predictions

sepuaka
17.69
5.86
10.69
9.53
11.93
14.28

Define kn = coefficient matrix of nonadditive genetic predictions

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

kn
0 0 0 0.5 0 0 0 0 0 0 0 0
0 0 0 0.5 0 0 0 0 0 0 0 0
0 0 0 0.5 0 0 0 0 0 0 0 0
0 0 0 0.5 0 0 0 0 0 0 0 0
0 0 0 0.5 0 0 0 0 0 0 0 0
0 0 0 0.5 0 0 0 0 0 0 0 0

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

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

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

Compute uakn = vector of multibreed nonadditive genetic predictions

uakn
4.12
4.12
4.12
4.12
4.12
4.12

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

vepuakn
16.47 16.47 16.47 16.47 16.47 16.47
16.47 16.47 16.47 16.47 16.47 16.47
16.47 16.47 16.47 16.47 16.47 16.47
16.47 16.47 16.47 16.47 16.47 16.47
16.47 16.47 16.47 16.47 16.47 16.47
16.47 16.47 16.47 16.47 16.47 16.47

Compute sepuakn = vector of standard errors of nonadditive genetic predictions

sepuakn
4.06
4.06
4.06
4.06
4.06
4.06

Define kt = coefficient matrix of total genetic predictions

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

kt
0 1 -1 0.5 0 0 1 0 0 0 0 0
0 0 0 0.5 0 0 0 1 0 0 0 0
0 0.5 -0.5 0.5 0 0 0 0 1 0 0 0
0 0.5 -0.5 0.5 0 0 0 0 0 1 0 0
0 0.5 -0.5 0.5 0 0 0 0 0 0 1 0
0 0.75 -0.75 0.5 0 0 0 0 0 0 0 1

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.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.50 0.50 0.00 0.00 0.00 0.00 1.00 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.50 -0.50 0.50 0.00 0.00 0.00 0.00 0.00 0.00 1.00 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

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.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.50 0.50 0.00 -0.00 -0.00 0.00 1.00 -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.50 -0.50 0.50 0.00 -0.00 -0.00 0.00 -0.00 -0.00 1.00 -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

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

Compute uakt = vector of multibreed total genetic predictions

uakt
14.80
3.73
7.91
10.06
9.55
10.78

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

vepuakt
317.60 55.99 163.36 150.00 198.91 243.25
55.99 55.34 48.15 36.42 51.06 52.30
163.36 48.15 118.15 83.77 110.55 140.16
150.00 36.42 83.77 94.69 97.18 117.93
198.91 51.06 110.55 97.18 146.10 157.50
243.25 52.30 140.16 117.93 157.50 208.25

Compute sepuakt = vector of standard errors of total genetic predictions

sepuakt
17.82
7.44
10.87
9.73
12.09
14.43