Professional Documents
Culture Documents
Animal
Sex
Sire
Dam
WWG(kg)
4
5
6
7
8
Male
Female
Female
Male
Male
1
3
1
4
3
Unknown
2
2
5
6
4.5
2.9
3.9
3.5
5.0
Z
[1,]
[2,]
[3,]
[4,]
[5,]
Y <- matrix(c(4.5,2.9,3.9,3.5,5),5,1)
Y
[,1]
[1,] 4.5
[2,] 2.9
[3,] 3.9
[4,] 3.5
[5,] 5.0
The inverse of the numerator relationship matrix will be calculated using
package `pedigree` according.
animal <- c(1:8)
dam<-c(0,0,0,0,2,2,5,6)
sire<-c(0,0,0,1,3,1,4,3)
ped<-data.frame(animal,dam,sire)
ped
animal dam sire
1
1
0
0
2
2
0
0
3
3
0
0
4
4
0
1
5
5
2
3
6
6
2
1
7
7
5
4
8
8
6
3
> makeAinv(ped)
[1] TRUE
> Ai<-read.table("Ainv.txt")
> Ai
V1 V2
V3
1
1 1 1.833330
2
2 1 0.500000
3
2 2 2.000000
4
3 2 0.500000
5
3 3 2.000000
6
4 1 -0.666667
7
4 4 1.833330
8
5 2 -1.000000
9
5 3 -1.000000
10 5 4 0.500000
11 5 5 2.500000
12 6 1 -1.000000
13 6 2 -1.000000
14 6 3 0.500000
15 6 6 2.500000
16 7 4 -1.000000
17 7 5 -1.000000
18 7 7 2.000000
19
20
21
8
8
8
3 -1.000000
6 -1.000000
8 2.000000
Fulled:
1 1.833 0.5
2
0.5
2
3
0 0.5
4 -0.667
0
5
0 -1
6
-1 -1
7
0
0
8
0
0
0
0.5
2
0
-1
0.5
0
-1
4
0.667
0
0
1.833
0.5
0
-1
0
0
-1
-1
0.5
2.5
0
-1
0
-1
-1
0.5
0
0
2.5
0
-1
0
0
0
-1
-1
0
2
0
0
0
-1
0
0
-1
0
2
Then data in R:
AINV<- matrix(c(1.833,0.5,0,-0.667,0,-1,0,0,
0.5,2,0.5,0,-1,-1,0,0,
0,0.5,2,0,-1,0.5,0,-1,
-0.667,0,0,1.833,.5,0,-1,0,
0,-1,-1,0.5,2.5,0,-1,0,
-1,-1,0.5,0,0,2.5,0,-1,
0,0,0,-1,-1,0,2,0,
0,0,-1,0,0,-1,0,2),8,8)
AINV
X Z
X X
Z X Z Z A 1
b X y
u Z y
YP <- t(Y)
XP <- t(X)
ZP <- t(Z)
XPX <- XP%*%X
XPZ <- XP%*%Z
ZPX <- ZP%*%X
ZPZ <- ZP%*%Z
XPY <- XP%*%Y
ZPY <- ZP%*%Y
ALPHA=2
ZPZA <- ZPZ+(AINV*ALPHA)
CFX <- matrix(c(XPX,XPZ),2,10)
Breeding Value
0.098
-0.019
-0.041
-0.009
-0.186
0.177
-0.249
0.183
Accuracy
0.239
0.126
0.295
0.380
0.379
0.340
0.341
0.394
SEP
4.342
4.437
4.273
4.137
4.138
4.206
4.205
4.111