GEV_02_GENETIC-GENOMIC MODELS_ALL GENOTYPES_October-30-2014_a November 1, 2014
INPUT DATA FILE

Obs animal sire dam afa afb sfa sfb dfa dfb mgsfa mgsfb mgdfa mgdfb sex bw ww snp01 snp02 snp03 snp04 snp05 snp06 snp07 snp08 snp09 snp10 snp11 snp12 snp13 snp14 snp15 snp16 snp17 snp18 snp19 snp20 snp21 snp22 snp23 snp24 snp25 snp26 snp27 snp28 snp29 snp30 snp31 snp32 snp33 snp34 snp35 snp36 snp37 snp38 snp39 snp40 snp41 snp42 snp43 snp44 snp45 snp46 snp47 snp48 snp49 snp50 snp51 snp52 snp53 snp54 snp55 snp56 snp57 snp58 snp59 snp60
1 1 0 0 1.00 0.00 1 0 1.0 0.0 1 0 1 0 1 33 289 2 1 1 2 1 1 2 2 0 1 1 1 0 1 2 1 2 0 2 2 0 2 2 0 1 0 0 0 1 0 2 1 0 1 0 1 1 2 2 1 0 2 1 1 0 1 2 1 1 1 0 2 0 2 0 0 0 0 2 2
2 2 0 0 0.00 1.00 0 1 0.0 1.0 0 1 0 1 2 29 245 0 1 2 0 0 1 2 2 1 2 2 0 1 2 1 1 2 1 0 2 0 2 2 2 1 1 1 2 2 1 2 2 1 1 0 1 1 1 2 2 2 1 2 0 1 0 0 2 0 2 2 1 1 0 0 1 0 1 2 1
3 3 0 2 0.50 0.50 1 0 0.0 1.0 0 1 0 1 2 32 256 1 2 0 0 1 1 1 2 2 2 1 0 1 0 2 1 2 1 2 2 0 2 2 0 1 1 0 2 1 1 2 2 1 0 0 0 2 0 1 2 0 1 1 0 0 2 1 2 2 1 0 1 0 1 0 0 0 1 1 2
4 4 1 0 0.50 0.50 1 0 0.0 1.0 0 1 0 1 2 30 261 1 2 0 0 0 2 2 0 0 2 1 2 0 1 1 0 2 2 1 0 0 1 1 1 1 1 0 2 2 1 1 1 1 1 1 1 1 0 2 2 0 1 2 0 1 1 1 2 2 1 2 1 0 1 0 1 0 1 2 1
5 5 1 2 0.50 0.50 1 0 0.0 1.0 0 1 0 1 1 38 292 1 2 0 1 1 1 1 1 1 2 2 2 0 1 1 1 2 0 2 2 0 2 1 1 0 0 1 1 0 0 2 2 0 0 0 2 2 2 2 1 2 2 2 0 0 0 2 2 1 2 0 1 0 1 0 1 0 2 2 1
6 6 1 3 0.75 0.25 1 0 0.5 0.5 1 0 0 1 1 35 286 2 1 2 2 1 2 2 1 1 2 1 1 2 0 2 0 2 1 0 1 0 1 2 2 0 0 0 2 1 0 2 2 1 1 1 0 2 0 1 1 0 2 1 0 0 1 2 1 1 2 1 1 1 2 0 1 0 1 2 1



GEV_02_GENETIC-GENOMIC MODELS_ALL GENOTYPES_October-30-2014_a November 1, 2014
Model_4_GEV_02_1T_4SNP_Random_PolEffect_October-30-2014_a November 1, 2014

GENETIC AND GENOMIC EVALUATION NOTES

CHAPTER GEV_02 ALL MODELS

MULTIPLE TRAIT GENETIC AND GENOMIC MODELS WITH:

1) UNEQUAL RESIDUAL, ADDITIVE GENETIC, AND NONADDITIVE GENETIC COVARIANCE MATRICES ACROSS BREED GROUPS

2) EQUAL RESIDUAL COVARIANCE MATRIX, UNEQUAL ADDITIVE AND NONADDITIVE GENETIC COVARIANCE MATRICES

3) EQUAL RESIDUAL AND ADDITIVE GENETIC COVARIANCE MATRICES, UNEQUAL NONADDITIVE GENETIC COVARIANCE MATRICES

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

Mauricio A. Elzo, University of Florida, maelzo@ufl.edu

Read input dataset (SAS file)

datmat = matrix of input data

datmat
  COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16 COL17 COL18 COL19 COL20 COL21 COL22 COL23 COL24 COL25 COL26 COL27 COL28 COL29 COL30 COL31 COL32 COL33 COL34 COL35 COL36 COL37 COL38 COL39 COL40 COL41 COL42 COL43 COL44 COL45 COL46 COL47 COL48 COL49 COL50 COL51 COL52 COL53 COL54 COL55 COL56 COL57 COL58 COL59 COL60 COL61 COL62 COL63 COL64 COL65 COL66 COL67 COL68 COL69 COL70 COL71 COL72 COL73 COL74 COL75 COL76
ROW1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 33 289 2 1 1 2 1 1 2 2 0 1 1 1 0 1 2 1 2 0 2 2 0 2 2 0 1 0 0 0 1 0 2 1 0 1 0 1 1 2 2 1 0 2 1 1 0 1 2 1 1 1 0 2 0 2 0 0 0 0 2 2
ROW2 2 0 0 0 1 0 1 0 1 0 1 0 1 2 29 245 0 1 2 0 0 1 2 2 1 2 2 0 1 2 1 1 2 1 0 2 0 2 2 2 1 1 1 2 2 1 2 2 1 1 0 1 1 1 2 2 2 1 2 0 1 0 0 2 0 2 2 1 1 0 0 1 0 1 2 1
ROW3 3 0 2 0.5 0.5 1 0 0 1 0 1 0 1 2 32 256 1 2 0 0 1 1 1 2 2 2 1 0 1 0 2 1 2 1 2 2 0 2 2 0 1 1 0 2 1 1 2 2 1 0 0 0 2 0 1 2 0 1 1 0 0 2 1 2 2 1 0 1 0 1 0 0 0 1 1 2
ROW4 4 1 0 0.5 0.5 1 0 0 1 0 1 0 1 2 30 261 1 2 0 0 0 2 2 0 0 2 1 2 0 1 1 0 2 2 1 0 0 1 1 1 1 1 0 2 2 1 1 1 1 1 1 1 1 0 2 2 0 1 2 0 1 1 1 2 2 1 2 1 0 1 0 1 0 1 2 1
ROW5 5 1 2 0.5 0.5 1 0 0 1 0 1 0 1 1 38 292 1 2 0 1 1 1 1 1 1 2 2 2 0 1 1 1 2 0 2 2 0 2 1 1 0 0 1 1 0 0 2 2 0 0 0 2 2 2 2 1 2 2 2 0 0 0 2 2 1 2 0 1 0 1 0 1 0 2 2 1
ROW6 6 1 3 0.75 0.25 1 0 0.5 0.5 1 0 0 1 1 35 286 2 1 2 2 1 2 2 1 1 2 1 1 2 0 2 0 2 1 0 1 0 1 2 2 0 0 0 2 1 0 2 2 1 1 1 0 2 0 1 1 0 2 1 0 0 1 2 1 1 2 1 1 1 2 0 1 0 1 2 1

Read allele frequencies input dataset (SAS file)

ntsnp
60

snpfreq
1 0.1509
2 0.4252
3 0.1842
4 0.5314
5 0.6242
6 0.4292
7 0.2036
8 0.3518
9 0.5454
10 0.1048
11 0.3338
12 0.3284
13 0.006
14 0.502
15 0.2263
16 0.4706
17 0.0808
18 0.7216
19 0.026
20 0.3271
21 0.8718
22 0.0948
23 0.3825
24 0.0561
25 0.5401
26 0.6809
27 0.785
28 0.3758
29 0.0067
30 0.7891
31 0.0581
32 0.1429
33 0.6041
34 0.7196
35 0.9386
36 0.6335
37 0.4312
38 0.0033
39 0.2717
40 0.2203
41 0.5794
42 0.2023
43 0.5134
44 0.755
45 0.5648
46 0.518
47 0.3458
48 0.4806
49 0.3258
50 0.3117
51 0.7503
52 0.4132
53 0.743
54 0.6061
55 0.9933
56 0.7377
57 0.9399
58 0.4419
59 0.1295
60 0.0928

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

Enter nt = Number of traits

nt
1

Enter nrec = Number of records

nrec
6

Enter nfixpol = Number of fixed environmental and polygenic genetic effects

nfixpol
6

Enter nanim = Number of animals

nanim
6

Enter nsnp = number of marker locus genomic effects in the model

nsnp
4

Enter 1 if random marker genomic effects in the model, else enter zero

ranma
1

Enter 1 if random additive polygenic genetic effects in the model, else enter zero

addpol
1

Enter 1 if random nonadditive polygenic genetic effects in the model, else enter zero

nadpol
0

Enter 1 if zma values are [0,1,2] and 2 if zma values are [VanRaden(2009)]

zmaval
1

Compute nf = Number of equations for fixed effects in the MME

nf
6

Compute nma = Number of equations for marker locus additive genetic effects in the MME

nma
4

Compute nga = Number of equations for random polygenic additive genetic effects in the MME

nga
6

Compute ngn = Number of equations for random polygenic nonadditive genetic effects in the MME

ngn
0

Compute neq = nf+nma+nga+ngn = total number of equations in the MME

neq
16

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

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

Construct xf = matrix of fixed and random effects

Construct fixed effects in matrix xf

Construct marker locus additive genomic effects in matrix xf

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

Construct random polygenic additive genetic effects in matrix xf

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

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
ROW1 1 1 0 0 1 0 2 1 1 2 1 0 0 0 0 0
ROW2 1 0 1 0 0 1 0 1 2 0 0 1 0 0 0 0
ROW3 1 0.5 0.5 1 0 1 1 2 0 0 0 0 1 0 0 0
ROW4 1 0.5 0.5 1 0 1 1 2 0 0 0 0 0 1 0 0
ROW5 1 0.5 0.5 1 1 0 1 2 0 1 0 0 0 0 1 0
ROW6 1 0.75 0.25 0.5 1 0 2 1 2 2 0 0 0 0 0 1

Enter intrabreed and interbreed environmental variances

veaa vebb veab
49 16 25

Compute vef = block-diagonal matrix of multibreed residual covariance matrices for individual animals

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

vef
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

Make r = vef

r = block-diagonal matrix of residual covariance matrices for individual animals

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 block-diagonal matrix of residual covariance matrices for individual animals

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.0408163 0 0.0307692 0.0307692 0.0307692 0.0425532
0.0204082 0.0625 0.0615385 0.0615385 0.0615385 0.0212766
0.0204082 0.125 0 0 0 0.0425532
0.0408163 0 0 0 0.0307692 0.0425532
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

Compute xtinvrx = x transpose times r times x

xtinvrx
  COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16
ROW1 0.1964925 0.0825195 0.113973 0.102946 0.072454 0.1240385 0.1756772 0.2888001 0.1879614 0.1141387 0.0204082 0.0625 0.0307692 0.0307692 0.0307692 0.0212766
ROW2 0.0825195 0.0554532 0.0270663 0.0541326 0.0517502 0.0307692 0.1188851 0.1286733 0.0523231 0.0881158 0.0204082 0 0.0153846 0.0153846 0.0153846 0.0159574
ROW3 0.113973 0.0270663 0.0869067 0.0488134 0.0207038 0.0932692 0.0567921 0.1601268 0.1356383 0.0260229 0 0.0625 0.0153846 0.0153846 0.0153846 0.0053191
ROW4 0.102946 0.0541326 0.0488134 0.0976268 0.0414075 0.0615385 0.1135843 0.1952537 0.0212766 0.0520458 0 0 0.0307692 0.0307692 0.0307692 0.0106383
ROW5 0.072454 0.0517502 0.0207038 0.0414075 0.072454 0 0.1141387 0.1032232 0.0629614 0.1141387 0.0204082 0 0 0 0.0307692 0.0212766
ROW6 0.1240385 0.0307692 0.0932692 0.0615385 0 0.1240385 0.0615385 0.1855769 0.125 0 0 0.0625 0.0307692 0.0307692 0 0
ROW7 0.1756772 0.1188851 0.0567921 0.1135843 0.1141387 0.0615385 0.2590467 0.2679849 0.1259227 0.1975083 0.0408163 0 0.0307692 0.0307692 0.0307692 0.0425532
ROW8 0.2888001 0.1286733 0.1601268 0.1952537 0.1032232 0.1855769 0.2679849 0.4734155 0.1879614 0.144908 0.0204082 0.0625 0.0615385 0.0615385 0.0615385 0.0212766
ROW9 0.1879614 0.0523231 0.1356383 0.0212766 0.0629614 0.125 0.1259227 0.1879614 0.3555145 0.1259227 0.0204082 0.125 0 0 0 0.0425532
ROW10 0.1141387 0.0881158 0.0260229 0.0520458 0.1141387 0 0.1975083 0.144908 0.1259227 0.1975083 0.0408163 0 0 0 0.0307692 0.0425532
ROW11 0.0204082 0.0204082 0 0 0.0204082 0 0.0408163 0.0204082 0.0204082 0.0408163 0.0204082 0 0 0 0 0
ROW12 0.0625 0 0.0625 0 0 0.0625 0 0.0625 0.125 0 0 0.0625 0 0 0 0
ROW13 0.0307692 0.0153846 0.0153846 0.0307692 0 0.0307692 0.0307692 0.0615385 0 0 0 0 0.0307692 0 0 0
ROW14 0.0307692 0.0153846 0.0153846 0.0307692 0 0.0307692 0.0307692 0.0615385 0 0 0 0 0 0.0307692 0 0
ROW15 0.0307692 0.0153846 0.0153846 0.0307692 0.0307692 0 0.0307692 0.0615385 0 0.0307692 0 0 0 0 0.0307692 0
ROW16 0.0212766 0.0159574 0.0053191 0.0106383 0.0212766 0 0.0425532 0.0212766 0.0425532 0.0425532 0 0 0 0 0 0.0212766

Enter intrabreed and interbreed additive genetic covariance matrices

vaaa vabb vaab
36 44 22

Compute kden = 2*sum{pj*(1-pj)} over j=1 to number of marker loci affecting trait(s)

ntsnp kden
60 20.974159

Compute common marker additive covariance matrix

vmaaa
1.7163978

Compute gma = marker locus additive genomic covariance matrix for individual markers

gma
1.7163978 0 0 0
0 1.7163978 0 0
0 0 1.7163978 0
0 0 0 1.7163978

Compute gmainv = inverse of the diagonal marker additive genomic covariance matrix

gmainv
0.5826155 0 0 0
0 0.5826155 0 0
0 0 0.5826155 0
0 0 0 0.5826155

Compute vaf = multibreed additive genetic covariance matrices for individual animals

vaf
36 0 0 0 0 0
0 44 0 0 0 0
0 0 40 0 0 0
0 0 0 40 0 0
0 0 0 0 40 0
0 0 0 0 0 43.5

Compute daf = block-diagonal matrix of residual additive genetic covariance matrices

Recall: (Ga)-1 = (I - 1/2 P') (Block-diagonal Da)-1 (I - 1/2 P) for [dai]-1 blocks

daf
36 0 0 0 0 0
0 44 0 0 0 0
0 0 29 0 0 0
0 0 0 31 0 0
0 0 0 0 20 0
0 0 0 0 0 24.5

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

Compute dainv = inverse of da

dainv = inverse of block-diagonal matrix of residual additive genetic covariance matrices

dainv
0.0277778 0 0 0 0 0
0 0.0227273 0 0 0 0
0 0 0.0344828 0 0 0
0 0 0 0.0322581 0 0
0 0 0 0 0.05 0
0 0 0 0 0 0.0408163

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.0585464 0.0125 0.0102041 -0.016129 -0.025 -0.020408
0.0125 0.043848 -0.017241 0 -0.025 0
0.0102041 -0.017241 0.0446868 0 0 -0.020408
-0.016129 0 0 0.0322581 0 0
-0.025 -0.025 0 0 0.05 0
-0.020408 0 -0.020408 0 0 0.0408163

gainv
0.059 0.013 0.010 -0.016 -0.025 -0.020
0.013 0.044 -0.017 0.000 -0.025 0.000
0.010 -0.017 0.045 0.000 0.000 -0.020
-0.016 0.000 0.000 0.032 0.000 0.000
-0.025 -0.025 0.000 0.000 0.050 0.000
-0.020 0.000 -0.020 0.000 0.000 0.041

Compute lhs = left hand side of the MME

Add gmainv to lhs

Add gainv to lhs

lhs
  COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16
ROW1 0.1964925 0.0825195 0.113973 0.102946 0.072454 0.1240385 0.1756772 0.2888001 0.1879614 0.1141387 0.0204082 0.0625 0.0307692 0.0307692 0.0307692 0.0212766
ROW2 0.0825195 0.0554532 0.0270663 0.0541326 0.0517502 0.0307692 0.1188851 0.1286733 0.0523231 0.0881158 0.0204082 0 0.0153846 0.0153846 0.0153846 0.0159574
ROW3 0.113973 0.0270663 0.0869067 0.0488134 0.0207038 0.0932692 0.0567921 0.1601268 0.1356383 0.0260229 0 0.0625 0.0153846 0.0153846 0.0153846 0.0053191
ROW4 0.102946 0.0541326 0.0488134 0.0976268 0.0414075 0.0615385 0.1135843 0.1952537 0.0212766 0.0520458 0 0 0.0307692 0.0307692 0.0307692 0.0106383
ROW5 0.072454 0.0517502 0.0207038 0.0414075 0.072454 0 0.1141387 0.1032232 0.0629614 0.1141387 0.0204082 0 0 0 0.0307692 0.0212766
ROW6 0.1240385 0.0307692 0.0932692 0.0615385 0 0.1240385 0.0615385 0.1855769 0.125 0 0 0.0625 0.0307692 0.0307692 0 0
ROW7 0.1756772 0.1188851 0.0567921 0.1135843 0.1141387 0.0615385 0.8416623 0.2679849 0.1259227 0.1975083 0.0408163 0 0.0307692 0.0307692 0.0307692 0.0425532
ROW8 0.2888001 0.1286733 0.1601268 0.1952537 0.1032232 0.1855769 0.2679849 1.0560311 0.1879614 0.144908 0.0204082 0.0625 0.0615385 0.0615385 0.0615385 0.0212766
ROW9 0.1879614 0.0523231 0.1356383 0.0212766 0.0629614 0.125 0.1259227 0.1879614 0.9381301 0.1259227 0.0204082 0.125 0 0 0 0.0425532
ROW10 0.1141387 0.0881158 0.0260229 0.0520458 0.1141387 0 0.1975083 0.144908 0.1259227 0.7801238 0.0408163 0 0 0 0.0307692 0.0425532
ROW11 0.0204082 0.0204082 0 0 0.0204082 0 0.0408163 0.0204082 0.0204082 0.0408163 0.0789545 0.0125 0.0102041 -0.016129 -0.025 -0.020408
ROW12 0.0625 0 0.0625 0 0 0.0625 0 0.0625 0.125 0 0.0125 0.106348 -0.017241 0 -0.025 0
ROW13 0.0307692 0.0153846 0.0153846 0.0307692 0 0.0307692 0.0307692 0.0615385 0 0 0.0102041 -0.017241 0.0754561 0 0 -0.020408
ROW14 0.0307692 0.0153846 0.0153846 0.0307692 0 0.0307692 0.0307692 0.0615385 0 0 -0.016129 0 0 0.0630273 0 0
ROW15 0.0307692 0.0153846 0.0153846 0.0307692 0.0307692 0 0.0307692 0.0615385 0 0.0307692 -0.025 -0.025 0 0 0.0807692 0
ROW16 0.0212766 0.0159574 0.0053191 0.0106383 0.0212766 0 0.0425532 0.0212766 0.0425532 0.0425532 -0.020408 0 -0.020408 0 0 0.0620929

lhs
0.196 0.083 0.114 0.103 0.072 0.124 0.176 0.289 0.188 0.114 0.020 0.063 0.031 0.031 0.031 0.021
0.083 0.055 0.027 0.054 0.052 0.031 0.119 0.129 0.052 0.088 0.020 0.000 0.015 0.015 0.015 0.016
0.114 0.027 0.087 0.049 0.021 0.093 0.057 0.160 0.136 0.026 0.000 0.063 0.015 0.015 0.015 0.005
0.103 0.054 0.049 0.098 0.041 0.062 0.114 0.195 0.021 0.052 0.000 0.000 0.031 0.031 0.031 0.011
0.072 0.052 0.021 0.041 0.072 0.000 0.114 0.103 0.063 0.114 0.020 0.000 0.000 0.000 0.031 0.021
0.124 0.031 0.093 0.062 0.000 0.124 0.062 0.186 0.125 0.000 0.000 0.063 0.031 0.031 0.000 0.000
0.176 0.119 0.057 0.114 0.114 0.062 0.842 0.268 0.126 0.198 0.041 0.000 0.031 0.031 0.031 0.043
0.289 0.129 0.160 0.195 0.103 0.186 0.268 1.056 0.188 0.145 0.020 0.063 0.062 0.062 0.062 0.021
0.188 0.052 0.136 0.021 0.063 0.125 0.126 0.188 0.938 0.126 0.020 0.125 0.000 0.000 0.000 0.043
0.114 0.088 0.026 0.052 0.114 0.000 0.198 0.145 0.126 0.780 0.041 0.000 0.000 0.000 0.031 0.043
0.020 0.020 0.000 0.000 0.020 0.000 0.041 0.020 0.020 0.041 0.079 0.013 0.010 -0.016 -0.025 -0.020
0.063 0.000 0.063 0.000 0.000 0.063 0.000 0.063 0.125 0.000 0.013 0.106 -0.017 0.000 -0.025 0.000
0.031 0.015 0.015 0.031 0.000 0.031 0.031 0.062 0.000 0.000 0.010 -0.017 0.075 0.000 0.000 -0.020
0.031 0.015 0.015 0.031 0.000 0.031 0.031 0.062 0.000 0.000 -0.016 0.000 0.000 0.063 0.000 0.000
0.031 0.015 0.015 0.031 0.031 0.000 0.031 0.062 0.000 0.031 -0.025 -0.025 0.000 0.000 0.081 0.000
0.021 0.016 0.005 0.011 0.021 0.000 0.043 0.021 0.043 0.043 -0.020 0.000 -0.020 0.000 0.000 0.062

Compute rhs = right hand side of the MME

rhs
52.187873
22.907943
29.27993
27.934861
20.967681
31.220192
48.858439
77.080181
48.693172
32.950747
5.8979592
15.3125
7.8769231
8.0307692
8.9846154
6.0851064

rhs
52.19
22.91
29.28
27.93
20.97
31.22
48.86
77.08
48.69
32.95
5.90
15.31
7.88
8.03
8.98
6.09

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
ROW1 10.961943 7.112969 3.848974 -12.18439 7.412409 3.549534 -0.906573 -0.809824 -1.432422 -0.906573 -8.749781 -10.68578 -5.746022 -4.817652 -9.154108 -8.628901
ROW2 7.112969 63.205363 -56.09239 -17.15068 -16.96642 24.079390 -2.139171 -0.435426 0.233528 -1.280972 -15.50413 18.868405 -1.836924 -11.08936 11.608425 -8.489928
ROW3 3.848974 -56.09239 59.941369 4.966290 24.378831 -20.52986 1.232598 -0.374399 -1.665949 0.374399 6.754347 -29.55419 -3.909098 6.271711 -20.76253 -0.138973
ROW4 -12.18439 -17.15068 4.966290 44.426010 -2.636180 -9.548208 -0.008998 -1.707400 2.547604 0.849201 4.693769 5.378500 -4.872933 -5.231911 -4.859022 -0.346449
ROW5 7.412409 -16.96642 24.378831 -2.636180 24.448133 -17.03572 -0.591633 -0.266566 -1.131249 -1.449832 -7.928404 -10.22645 0.410313 2.695798 -17.18354 -8.399073
ROW6 3.549534 24.079390 -20.52986 -9.548208 -17.03572 20.585257 -0.314941 -0.543258 -0.301172 0.543258 -0.821377 -0.459331 -6.156335 -7.513450 8.029430 -0.229829
ROW7 -0.906573 -2.139171 1.232598 -0.008998 -0.591633 -0.314941 1.709643 0.006755 -0.020264 -0.006755 0.052274 0.022690 -0.072874 -0.005835 0.116191 -0.203137
ROW8 -0.809824 -0.435426 -0.374399 -1.707400 -0.266566 -0.543258 0.006755 1.709643 0.020264 0.006755 -0.052274 -0.022690 0.072874 0.005835 -0.116191 0.203137
ROW9 -1.432422 0.233528 -1.665949 2.547604 -1.131249 -0.301172 -0.020264 0.020264 1.655605 -0.020264 0.156821 0.068070 -0.218621 -0.017506 0.348572 -0.609410
ROW10 -0.906573 -1.280972 0.374399 0.849201 -1.449832 0.543258 -0.006755 0.006755 -0.020264 1.709643 0.052274 0.022690 -0.072874 -0.005835 0.116191 -0.203137
ROW11 -8.749781 -15.50413 6.754347 4.693769 -7.928404 -0.821377 0.052274 -0.052274 0.156821 0.052274 33.360986 2.555443 5.529467 13.079641 17.349107 20.937541
ROW12 -10.68578 18.868405 -29.55419 5.378500 -10.22645 -0.459331 0.022690 -0.022690 0.068070 0.022690 2.555443 40.585852 16.175823 6.088567 21.306258 10.013387
ROW13 -5.746022 -1.836924 -3.909098 -4.872933 0.410313 -6.156335 -0.072874 0.072874 -0.218621 -0.072874 5.529467 16.175823 28.179325 10.971529 11.701791 14.773989
ROW14 -4.817652 -11.08936 6.271711 -5.231911 2.695798 -7.513450 -0.005835 0.005835 -0.017506 -0.005835 13.079641 6.088567 10.971529 28.960476 9.652099 11.858997
ROW15 -9.154108 11.608425 -20.76253 -4.859022 -17.18354 8.029430 0.116191 -0.116191 0.348572 0.116191 17.349107 21.306258 11.701791 9.652099 37.973793 17.842477
ROW16 -8.628901 -8.489928 -0.138973 -0.346449 -8.399073 -0.229829 -0.203137 0.203137 -0.609410 -0.203137 20.937541 10.013387 14.773989 11.858997 17.842477 36.556582

ginvlhs
10.962 7.113 3.849 -12.18 7.412 3.550 -0.907 -0.810 -1.432 -0.907 -8.750 -10.69 -5.746 -4.818 -9.154 -8.629
7.113 63.205 -56.09 -17.15 -16.97 24.079 -2.139 -0.435 0.234 -1.281 -15.50 18.868 -1.837 -11.09 11.608 -8.490
3.849 -56.09 59.941 4.966 24.379 -20.53 1.233 -0.374 -1.666 0.374 6.754 -29.55 -3.909 6.272 -20.76 -0.139
-12.18 -17.15 4.966 44.426 -2.636 -9.548 -0.009 -1.707 2.548 0.849 4.694 5.378 -4.873 -5.232 -4.859 -0.346
7.412 -16.97 24.379 -2.636 24.448 -17.04 -0.592 -0.267 -1.131 -1.450 -7.928 -10.23 0.410 2.696 -17.18 -8.399
3.550 24.079 -20.53 -9.548 -17.04 20.585 -0.315 -0.543 -0.301 0.543 -0.821 -0.459 -6.156 -7.513 8.029 -0.230
-0.907 -2.139 1.233 -0.009 -0.592 -0.315 1.710 0.007 -0.020 -0.007 0.052 0.023 -0.073 -0.006 0.116 -0.203
-0.810 -0.435 -0.374 -1.707 -0.267 -0.543 0.007 1.710 0.020 0.007 -0.052 -0.023 0.073 0.006 -0.116 0.203
-1.432 0.234 -1.666 2.548 -1.131 -0.301 -0.020 0.020 1.656 -0.020 0.157 0.068 -0.219 -0.018 0.349 -0.609
-0.907 -1.281 0.374 0.849 -1.450 0.543 -0.007 0.007 -0.020 1.710 0.052 0.023 -0.073 -0.006 0.116 -0.203
-8.750 -15.50 6.754 4.694 -7.928 -0.821 0.052 -0.052 0.157 0.052 33.361 2.555 5.529 13.080 17.349 20.938
-10.69 18.868 -29.55 5.378 -10.23 -0.459 0.023 -0.023 0.068 0.023 2.555 40.586 16.176 6.089 21.306 10.013
-5.746 -1.837 -3.909 -4.873 0.410 -6.156 -0.073 0.073 -0.219 -0.073 5.529 16.176 28.179 10.972 11.702 14.774
-4.818 -11.09 6.272 -5.232 2.696 -7.513 -0.006 0.006 -0.018 -0.006 13.080 6.089 10.972 28.960 9.652 11.859
-9.154 11.608 -20.76 -4.859 -17.18 8.029 0.116 -0.116 0.349 0.116 17.349 21.306 11.702 9.652 37.974 17.842
-8.629 -8.490 -0.139 -0.346 -8.399 -0.230 -0.203 0.203 -0.609 -0.203 20.938 10.013 14.774 11.859 17.842 36.557

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.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.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 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.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.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 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 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 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 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 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 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 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 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 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 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.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.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 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.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.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 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 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 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 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 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 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 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 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 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 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.176 0.289 0.188 0.114 0.020 0.062 0.031 0.031 0.031 0.021
0.083 0.055 0.027 0.054 0.052 0.031 0.119 0.129 0.052 0.088 0.020 -0.000 0.015 0.015 0.015 0.016
0.114 0.027 0.087 0.049 0.021 0.093 0.057 0.160 0.136 0.026 0.000 0.063 0.015 0.015 0.015 0.005
0.103 0.054 0.049 0.098 0.041 0.062 0.114 0.195 0.021 0.052 0.000 0.000 0.031 0.031 0.031 0.011
0.072 0.052 0.021 0.041 0.072 0.000 0.114 0.103 0.063 0.114 0.020 -0.000 0.000 0.000 0.031 0.021
0.124 0.031 0.093 0.062 0.000 0.124 0.062 0.186 0.125 0.000 -0.000 0.063 0.031 0.031 0.000 -0.000
0.176 0.119 0.057 0.114 0.114 0.062 0.842 0.268 0.126 0.198 0.041 -0.000 0.031 0.031 0.031 0.043
0.289 0.129 0.160 0.195 0.103 0.186 0.268 1.056 0.188 0.145 0.020 0.062 0.062 0.062 0.062 0.021
0.188 0.052 0.136 0.021 0.063 0.125 0.126 0.188 0.938 0.126 0.020 0.125 0.000 0.000 0.000 0.043
0.114 0.088 0.026 0.052 0.114 0.000 0.198 0.145 0.126 0.780 0.041 0.000 0.000 -0.000 0.031 0.043
0.020 0.020 -0.000 0.000 0.020 -0.000 0.041 0.020 0.020 0.041 0.079 0.012 0.010 -0.016 -0.025 -0.020
0.063 0.000 0.062 0.000 0.000 0.063 0.000 0.063 0.125 0.000 0.013 0.106 -0.017 0.000 -0.025 -0.000
0.031 0.015 0.015 0.031 0.000 0.031 0.031 0.062 -0.000 0.000 0.010 -0.017 0.075 -0.000 0.000 -0.020
0.031 0.015 0.015 0.031 -0.000 0.031 0.031 0.062 -0.000 0.000 -0.016 0.000 0.000 0.063 0.000 0.000
0.031 0.015 0.015 0.031 0.031 -0.000 0.031 0.062 0.000 0.031 -0.025 -0.025 -0.000 0.000 0.081 -0.000
0.021 0.016 0.005 0.011 0.021 0.000 0.043 0.021 0.043 0.043 -0.020 -0.000 -0.020 -0.000 -0.000 0.062

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

ranklhs
14

Compute sol = vector of solutions for the MME

sol
133.31776
71.321445
61.996315
8.1752066
82.823557
50.494203
-0.030262
0.0302622
-0.090787
-0.030262
0.8548811
-0.656967
-1.705792
1.3531675
0.4515816
-1.289386

sol
133.32
71.32
62.00
8.18
82.82
50.49
-0.03
0.03
-0.09
-0.03
0.85
-0.66
-1.71
1.35
0.45
-1.29

Compute sesol = standard error of solutions

sesol
3.31
7.95
7.74
6.67
4.94
4.54
1.31
1.31
1.29
1.31
5.78
6.37
5.31
5.38
6.16
6.05

Computation of Additive, Nonadditive, and Total Genetic Predictions

Using matrix computations

Define ka = coefficient matrix of multiple trait additive genetic predictions deviated from B

Construct coefficients for fixed snp additive genomic effects in matrix ka

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

ka
0.00 1.00 -1.00 0.00 0.00 0.00 2.00 1.00 1.00 2.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 2.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 1.00 2.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 1.00 2.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 1.00 2.00 0.00 1.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 2.00 1.00 2.00 2.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 2.00 1.00 1.00 2.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 2.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 1.00 2.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 1.00 2.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 1.00 2.00 -0.00 1.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 2.00 1.00 2.00 2.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 -0.00 0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00
-0.00 0.00 -0.00 0.00 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.00
-0.81
2.99
6.05
5.11
5.43

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

vepuaka
225.29 60.06 112.95 101.47 158.00 177.68
60.06 49.23 45.34 35.58 51.40 56.60
112.95 45.34 94.31 67.32 91.90 101.10
101.47 35.58 67.32 75.53 80.13 84.21
158.00 51.40 91.90 80.13 134.33 130.52
177.68 56.60 101.10 84.21 130.52 165.04

Compute sepuaka = vector of standard errors of additive genetic predictions

sepuaka
15.01
7.02
9.71
8.69
11.59
12.85

Define kn = coefficient matrix of direct and maternal 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
ROW1 0 0 0 0.5 0 0 0 0 0 0 0 0 0 0 0 0
ROW2 0 0 0 0.5 0 0 0 0 0 0 0 0 0 0 0 0
ROW3 0 0 0 0.5 0 0 0 0 0 0 0 0 0 0 0 0
ROW4 0 0 0 0.5 0 0 0 0 0 0 0 0 0 0 0 0
ROW5 0 0 0 0.5 0 0 0 0 0 0 0 0 0 0 0 0
ROW6 0 0 0 0.5 0 0 0 0 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.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.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.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.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.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

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

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

Compute uakn = vector of multibreed nonadditive genetic predictions

uakn
4.09
4.09
4.09
4.09
4.09
4.09

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

vepuakn
11.11 11.11 11.11 11.11 11.11 11.11
11.11 11.11 11.11 11.11 11.11 11.11
11.11 11.11 11.11 11.11 11.11 11.11
11.11 11.11 11.11 11.11 11.11 11.11
11.11 11.11 11.11 11.11 11.11 11.11
11.11 11.11 11.11 11.11 11.11 11.11

Compute sepuakn = vector of standard errors of nonadditive genetic predictions

sepuakn
3.33
3.33
3.33
3.33
3.33
3.33

Define kt = coefficient matrix of total direct and maternal genetic predictions

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

Construct coefficients for fixed snp additive genomic effects in matrix ka

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

kt
0.00 1.00 -1.00 0.50 0.00 0.00 2.00 1.00 1.00 2.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 2.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 1.00 2.00 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 1.00 2.00 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 1.00 2.00 0.00 1.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 2.00 1.00 2.00 2.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 2.00 1.00 1.00 2.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 2.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 1.00 2.00 -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 1.00 2.00 -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 1.00 2.00 -0.00 1.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 2.00 1.00 2.00 2.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 -0.00 0.00 0.00 -0.00 -0.00 0.00 0.00 -0.00
-0.00 -0.00 -0.00 0.00 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.09
3.28
7.07
10.13
9.20
9.52

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

vepuakt
221.50 68.10 106.93 95.27 152.40 175.40
68.10 69.10 51.15 41.22 57.64 66.16
106.93 51.15 86.06 58.89 84.08 96.59
95.27 41.22 58.89 66.92 72.14 79.53
152.40 57.64 84.08 72.14 126.94 126.45
175.40 66.16 96.59 79.53 126.45 164.28

Compute sepuakt = vector of standard errors of total genetic predictions

sepuakt
14.88
8.31
9.28
8.18
11.27
12.82