8.3 Calculating selection index
Inversion of the P matrix is done by a program made by Andrew to be found at the folowing location
Andrew Ippoliti's Blog.
The selection index can handle any number of traits. It is meant for solving smaller scientific problems
and for educational purposes. Note that the numeration
of the animals has to be from one in consecutive order and the oldest appear first. Link example
Put your data in the input area and press the botton Evaluate The program
can be used for any number of variables.
The format of the input file (a) is specified below:
Zero is treated as missing value so if zero is a part of the observation set a constant should be added.
The first 4 columns in the dataset shall contain animal, sire and dam and number - the other columns
can be used freely for any trait number.
The index is calculated as deviations from the means, so they are centred around zero.
If the number of traits in the selection goal are different from the observed trait number. Either there can be
introduced an extra trait containing zeros or opposite the economic weight of a trait can be set as zero.
The first data line specify the parameters as follows - referring to first example below as well as in general
The first line
1. 0 has to be there
2. specify number of variables
3-4 has to be filled with zeros
5.- c2 for repeated observation for the trait -otherwise zeros
The following lines
(one for each variable) contain VarP, VarA, economic weight and mean value and correlations
- additive correlations above diagonal and phenotypic below
Followed by the animal lines containing
animal, sire and dam and number of obs. + the variables
The number of observation should be interpreted as following:
negative numbers own records, works ok
positive numbers offspring group - only one parent half sib group
- both parents full sib group
positive number of obs (it becomes an pseudo animal) and the value of the offspring group is only used to transfer to the parents
Example of calculating a selection index for 4 animals and animal 3 has 3 observations one for each
of the 3 trait with the heritability of .5, .2 and .33, respectively; and both genetic and
phenotypic correlations medium to high.
Each line contain: Animal Sire Dam, where 0 means unknown, the number factor, and 3 variables
- except first line which specify the parameters explained above, and a line for each variable.
Put the data below in the input
window followed by using the Evaluate
0 3 0 0 0 0 0
1 .5 9 10 0 .707 .6
5 1 1 50 .65 0 .495
3 1 .1 200 .5 .52 0
1 0 0 0 0 0 0
2 0 0 0 0 0 0
3 1 2 0 9 0 0
3 1 2 0 0 45 0
3 1 2 0 0 0 210
4 1 0 0 0 0 0
|
Followed by the
Selection index
Animal Index Accuracy squared
1.0000 0.0432 0.1296
2.0000 0.0432 0.1296
3.0000 0.0865 0.5187
3.0000 0.0865 0.5187
3.0000 0.0865 0.5187
4.0000 0.0216 0.0324
( relationships)
1. 0. 0.50 0.50 0.50 0.50
0. 1. 0.50 0.50 0.50 0.
0.50 0.50 1. 1. 1. 0.25
0.50 0.50 1. 1. 1. 0.25
0.50 0.50 1. 1. 1. 0.25
0.50 0. 0.25 0.25 0.25 1.
|
( the P matrix)
1.0000 1.4534 0.8660
1.4534 5.0000 2.0139
0.8660 2.0139 3.0000
( the A matrix)
0.5000 0.4999 0.4242
0.4999 1.0000 0.4950
0.4242 0.4950 1.0000
|
A very simple example, 1 trait h2=0.2 weight factor=1 and mean value=10, 4 animals
sire
and 2 offspring with observations 9 and 13, and one offspring without observation.
Put the data below in
the input window followed by
using the Evaluate
0 1 0 0 0
1 .2 1 10 0
1 0 0 0 0
2 1 0 0 9
3 1 0 0 13
4 1 0 0 0
|
Followed by
Selection index
Animal Index Accuracy squared
1.0000 0.1904 0.0952
2.0000 -0.0776 0.2080
3.0000 0.5538 0.2080
4.0000 0.0952 0.0238
|
( relationships)
1.0000 0.5000 0.5000 0.5000
0.5000 1.0000 0.2500 0.2500
0.5000 0.2500 1.0000 0.2500
0.5000 0.2500 0.2500 1.0000
( the P matrix)
1.0000 0.0500
0.0500 1.0000
( the A matrix)
0.2000
|
And the same observation joined in a mean of 11 in a half sib offspring group ("animal" 3.)
Put the data below in
the input window followed
by using the Evaluate
0 1 0 0 0
1 .2 1 10 0
1 0 0 0 0
2 1 0 0 0
3 1 0 2 11
4 1 0 0 0
|
Resulting in the following
in the output window
|
Selection index
Animal Index Accuracy squared
Animal 3 represent an offspring group
1.0000 0.1904 0.0952
2.0000 0.0952 0.0238
3.0000 0.3809 0.0000
4.0000 0.0952 0.0238
|
( relationships)
1.0000 0.5000 0.5000 0.5000
0.5000 1.0000 0.2500 0.2500
0.5000 0.2500 1.0000 0.2500
0.5000 0.2500 0.2500 1.0000
( the P matrix)
0.5250
( the A matrix)
0.2000
|
Or the same observation joined in a mean of 11 in a full sib offspring group ("animal" 3.)
Put the data below in
the input window followed
by using the Evaluate
0 1 0 0 0
1 .2 1 10 0
1 0 0 0 0
2 0 0 0 0
3 1 2 2 11
4 1 0 0 0
|
|
Selection index
Animal Index Accuracy squared
Animal 3 represent an offspring group
1.0000 0.1818 0.0909
2.0000 0.1818 0.0909
3.0000 0.3636 0.0000
4.0000 0.0909 0.0227
|
( relationships)
1.0000 0.0000 0.5000 0.5000
0.0000 1.0000 0.5000 0.0000
0.5000 0.5000 1.0000 0.2500
0.5000 0.0000 0.2500 1.0000
( the P matrix)
0.5500
( the A matrix)
0.2000
|
Or repeated observations; h2=0.2, c2=0.1 weight factor=1 and mean value=10,
3 animals sire
and 1 offspring with observations 11 based on two repetitions, and an offspring without observation
Put the data below in
the input window followed
by using the Evaluate
0 1 0 0 .1
1 .2 1 10 0
1 0 0 0 0
2 1 0 -2 11
3 1 0 0 0
|
Selection index
Animal Index Accuracy squared
1.0000 0.1538 0.0769
2.0000 0.3076 0.3076
3.0000 0.0769 0.0192
( relationships)
1.0000 0.5000 0.5000
0.5000 1.0000 0.2500
0.5000 0.2500 1.0000
|
( the P matrix)
0.6500
( the A matrix)
0.2000
|
Or the same observation - 2 half sib's and the mother to one of the half sibs. Note the negative
weight factors of the mother for the estimation of the father, the b's
Put the data below in
the input window followed
by a return stroke
0 1 0 0 0
1 .2 1 10 0
1 0 0 0 0
2 0 0 0 9
3 1 2 2 13
4 1 0 0 9
|
Selection index
Animal Index Accuracy squared
1.0000 0.4567 0.1339
2.0000 0.2688 0.2595
3.0000 0.9488 0.0000
4.0000 0.0344 0.2148
|
( the b's)
-0.0096 0.1918 0.0810 -0.0040
0.0962 0.0810 0.1898 0.0405
0.0951 -0.0040 0.0405 0.1979
( the P matrix)
1.0000 0.1000 0.0000
0.1000 1.0000 0.0500
0.0000 0.0500 1.0000
( the A matrix)
0.2000
|
Two traits - positive correlation - three observations and five related individuals
Put the data below in
the input window followed
by using the Evaluate
0 2 0 0 0 0
1 .2 1 10 0 .5
2 .5 0.4 40 .6 0
1 0 0 0 0 0
2 0 0 0 0 0
3 1 2 0 0 45
4 1 0 0 11 0
5 1 0 0 0 37
|
|
Selection index
Animal Index Accuracy squared
1.0000 0.2890 0.1127
2.0000 0.4630 0.0396
3.0000 0.8390 0.1714
4.0000 0.3348 0.1849
5.0000 -0.3068 0.1714
|
( relationship)
1.0000 0.0000 0.5000 0.5000 0.5000
0.0000 1.0000 0.5000 0.0000 0.0000
0.5000 0.5000 1.0000 0.2500 0.2500
0.5000 0.0000 0.2500 1.0000 0.2500
0.5000 0.0000 0.2500 0.2500 1.0000
( the P matrix)
2.0000 0.0395 0.1250
0.0395 1.0000 0.0395
0.1250 0.0395 2.0000
( the A matrix)
0.2000 0.1581
0.1581 0.5000
|
Two traits - negative correlation - the same observations
Put the data below in
the input window followed
by using the Evaluate
0 2 0 0 0 0
1 .2 1 10 0 -.5
2 .5 0.4 40 -.6 0
1 0 0 0 0 0
2 0 0 0 0 0
3 1 2 0 0 45
4 1 0 0 11 0
5 1 0 0 0 37
|
Selection index
Animal Index Accuracy squared
1.0000 0.0915 0.0338
2.0000 0.0549 0.0014
3.0000 0.1281 0.0139
4.0000 0.1523 0.1233
5.0000 -0.0058 0.0139
|
( relationship)
1.0000 0.0000 0.5000 0.5000 0.5000
0.0000 1.0000 0.5000 0.0000 0.0000
0.5000 0.5000 1.0000 0.2500 0.2500
0.5000 0.0000 0.2500 1.0000 0.2500
0.5000 0.0000 0.2500 0.2500 1.0000
( the P matrix)
2.0000 -0.0395 0.1250
-0.0395 1.0000 -0.0395
0.1250 -0.0395 2.0000
( the A matrix)
0.2000 -0.1581
-0.1581 0.5000
|
Two traits - negative correlation - large half sib progeny groups
Put the data below in
the input window followed
by using the Evaluate
0 2 0 0 0 0
1 .2 1 10 0 -.5
2 .5 0.4 40 -.6 0
1 0 0 0 0 0
2 0 0 0 0 0
3 1 2 0 0 45
4 1 0 1000 11 0
5 1 0 1000 0 37
|
Selection index
Animal Index Accuracy squared
1.0000 -0.3624 0.9684
2.0000 0.0887 0.0015
3.0000 -0.0480 0.2457
4.0000 -0.0011 0.0000
5.0000 -1.0380 0.0000
|
( relationship)
1.0000 0.0000 0.5000 0.5000 0.5000
0.0000 1.0000 0.5000 0.0000 0.0000
0.5000 0.5000 1.0000 0.2500 0.2500
0.5000 0.0000 0.2500 1.0000 0.2500
0.5000 0.0000 0.2500 0.2500 1.0000
( the P matrix)
2.0000 -0.0395 0.1250
-0.0395 0.0509 -0.0395
0.1250 -0.0395 0.1268
( the A matrix)
0.2000 -0.1581
-0.1581 0.5000
|
Two traits - negative correlation - large full sib progeny groups
Put the data below in
the input window followed
by using the Evaluate
a=
0 2 0 0 0 0
1 .2 1 10 0 -.5
2 .5 0.4 40 -.6 0
1 0 0 0 0 0
2 0 0 0 0 0
3 1 0 0 0 45
4 1 2 1000 11 0
5 1 2 1000 0 37
|
Selection index
Animal Index Accuracy squared
1.0000 -0.1562 0.4928
2.0000 -0.2264 0.4927
3.0000 0.0270 0.1276
4.0000 -0.1384 0.0000
5.0000 -0.4706 0.0000
|
( relationship)
1.0000 0.0000 0.5000 0.5000 0.5000
0.0000 1.0000 0.0000 0.5000 0.5000
0.5000 0.0000 1.0000 0.2500 0.2500
0.5000 0.5000 0.2500 1.0000 0.5000
0.5000 0.5000 0.2500 0.5000 1.0000
( the P matrix)
2.0000 -0.0395 0.1250
-0.0395 0.1009 -0.0790
0.1250 -0.0790 0.2517
( the A matrix)
0.2000 -0.1581
-0.1581 0.5000
|
Back to the other programs
The theory is described well in Erling Strandbergs notes
and in the selection theory is described by Joel Weller in the book
"Economic aspects of animal breeding" Chapman Hall, London.