Examples


Models

Sire model without A

DATAFILE
test.dat
NUMBER_OF_TRAITS
1
NUMBER_OF_EFFECTS
2
OBSERVATION(S)
3
WEIGHT(S)

EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 2 cross
2 3 cross
RANDOM_RESIDUAL VALUES
10
RANDOM_GROUP
2
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
1

Sire model with A

DATAFILE
test.dat
NUMBER_OF_TRAITS
1
NUMBER_OF_EFFECTS
2
OBSERVATION(S)
3
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 2 cross
2 3 cross
RANDOM_RESIDUAL VALUES
10
RANDOM_GROUP
2
RANDOM_TYPE
add_sire
FILE
sire.ped
(CO)VARIANCES
1

Multiple (2) trait sire model

DATAFILE
test.dat
NUMBER_OF_TRAITS
2
NUMBER_OF_EFFECTS
2
OBSERVATION(S)
3 4
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 1 2 cross
2 2 3 cross
RANDOM_RESIDUAL VALUES
10 1
1 5
RANDOM_GROUP
2
RANDOM_TYPE
add_sire
FILE
sire.ped
(CO)VARIANCES
1 0.1
0.1 1

Animal model

DATAFILE
test.dat
NUMBER_OF_TRAITS
1
NUMBER_OF_EFFECTS
2
OBSERVATION(S)
3
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 2 cross
5 10 cross
RANDOM_RESIDUAL VALUES
10
RANDOM_GROUP
2
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1 

Multiple trait animal model

# Example 1: 2 trait animal model

DATAFILE
test.dat
NUMBER_OF_TRAITS
2
NUMBER_OF_EFFECTS
2
OBSERVATION(S)
3 4
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 1 2 cross
5 5 10 cross
RANDOM_RESIDUAL VALUES
10 1
1 5
RANDOM_GROUP
2
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1 0.1
0.1 1
# Example 2: different model for each trait

DATAFILE
test.dat
NUMBER_OF_TRAITS
2
NUMBER_OF_EFFECTS
3
OBSERVATION(S)
3 4
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 2 2 cross
5 5 10 cross
6 7 30 cross
RANDOM_RESIDUAL VALUES
10 1
1 5
RANDOM_GROUP
2
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1 0.1
0.1 1
RANDOM_GROUP
3
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
1 0
0 1
# This one works with Gibbs sampling programs

DATAFILE
test.dat
NUMBER_OF_TRAITS
2
NUMBER_OF_EFFECTS
5
OBSERVATION(S)
3 4
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 0 2 cross
0 2 2 cross
5 5 10 cross
6 0 30 cross
0 7 20 cross
RANDOM_RESIDUAL VALUES
10 1
1 5
RANDOM_GROUP
3
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1 0.1
0.1 1
RANDOM_GROUP
4
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
1 0
0 0
RANDOM_GROUP
5
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
0 0
0 1

OR

DATAFILE
test.dat
NUMBER_OF_TRAITS
2
NUMBER_OF_EFFECTS
5
OBSERVATION(S)
3 4
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 0 2 cross
0 2 2 cross
5 5 10 cross
6 0 30 cross
0 7 30 cross
RANDOM_RESIDUAL VALUES
10 1
1 5
RANDOM_GROUP
3
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1 0.1
0.1 1
RANDOM_GROUP
4 5
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
1 0 0 0
0 0 0 0
0 0 0 0
0 0 0 1

# Can you see the difference between these 3 setups in Example 2?

Dominance model

DATAFILE
dom.dat
NUMBER_OF_TRAITS
1
NUMBER_OF_EFFECTS
4
OBSERVATION(S)
3
WEIGHT(S)

EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 1 cross
4 1 cov
2 30001 cross
5 10412 cross
RANDOM_RESIDUAL VALUES
100
RANDOM_GROUP
3
RANDOM_TYPE
add_an_upginb
FILE
add.ped
(CO)VARIANCES
10
RANDOM_GROUP
4
RANDOM_TYPE
par_dom
FILE
dom.ped
(CO)VARIANCES
2

Animal model with UPG

DATAFILE
test.dat
NUMBER_OF_TRAITS
2
NUMBER_OF_EFFECTS
2
OBSERVATION(S)
3 4
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 1 2 cross
5 5 13 cross
RANDOM_RESIDUAL VALUES
10 1
1 5
RANDOM_GROUP
2
RANDOM_TYPE
add_an_upg
FILE
animal.ped
(CO)VARIANCES
1 0.1
0.1 1

Animal model with inbreeding

DATAFILE
test.dat
NUMBER_OF_TRAITS
2
NUMBER_OF_EFFECTS
2
OBSERVATION(S)
3 4
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 1 2 cross
5 5 13 cross
RANDOM_RESIDUAL VALUES
10 1
1 5
RANDOM_GROUP
2
RANDOM_TYPE
add_an_upginb
FILE
animal.ped
(CO)VARIANCES
1 0.1
0.1 1

Repeatability model 1

DATAFILE
test.dat
NUMBER_OF_TRAITS
1
NUMBER_OF_EFFECTS
3
OBSERVATION(S)
3
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 2 cross
5 5 cross
5 10 cross
RANDOM_RESIDUAL VALUES
10
RANDOM_GROUP
2
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1
RANDOM_GROUP
3
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
1 

Repeatability model 2

DATAFILE
test.dat
NUMBER_OF_TRAITS
2
NUMBER_OF_EFFECTS
3
OBSERVATION(S)
3 4
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 1 2 cross
5 5 5 cross
5 5 10 cross
RANDOM_RESIDUAL VALUES
10 1
1 5
RANDOM_GROUP
2
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1 0.1
0.1 1
RANDOM_GROUP
3
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
1 0.1
0.1 1

Maternal effect model

DATAFILE
maternal.dat
NUMBER_OF_TRAITS
1
NUMBER_OF_EFFECTS
4
OBSERVATION(S)
4
WEIGHT(S)

EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
3 946 cross
1 22473 cross
2 22473 cross
2 22473 cross
RANDOM_RESIDUAL VALUES
1050
RANDOM_GROUP
2 3
RANDOM_TYPE
add_animal
FILE
maternal.ped
(CO)VARIANCES
450 -100
-100 340
RANDOM_GROUP
4
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
370

Random regression model 1

DATAFILE
test.dat1
NUMBER_OF_TRAITS
2
NUMBER_OF_EFFECTS
9
OBSERVATION(S)
3 4
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 1 2 cross
6 6 1 cov
7 7 1 cov
2 2 5 cross
6 6 5 cov 2 2
7 7 5 cov 2 2
2 2 10 cross
6 6 10 cov 2 2
7 7 10 cov 2 2
RANDOM_RESIDUAL VALUES
10 1
1 5
RANDOM_GROUP
4 5 6
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
1 0.1 0.1 0.1 0.1 0.1
0.1 1 0.1 0.1 0.1 0.1
0.1 0.1 1 0.1 0.1 0.1
0.1 0.1 0.1 1 0.1 0.1
0.1 0.1 0.1 0.1 1 0.1
0.1 0.1 0.1 0.1 0.1 1
RANDOM_GROUP
7 8 9
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1 0.1 0.1 0.1 0.1 0.1
0.1 1 0.1 0.1 0.1 0.1
0.1 0.1 1 0.1 0.1 0.1
0.1 0.1 0.1 1 0.1 0.1
0.1 0.1 0.1 0.1 1 0.1
0.1 0.1 0.1 0.1 0.1 1

Random regression model 2

DATAFILE
test.dat2
NUMBER_OF_TRAITS
2
NUMBER_OF_EFFECTS
10
OBSERVATION(S)
3 4
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 1 2 cross
6 6 1 cov
7 7 1 cov
8 8 1 cov
6 6 5 cov 2 2
7 7 5 cov 2 2
8 8 5 cov 2 2
6 6 10 cov 2 2
7 7 10 cov 2 2
8 8 10 cov 2 2
RANDOM_RESIDUAL VALUES
10 1
1 5
RANDOM_GROUP
5 6 7
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
1 0.1 0.1 0.1 0.1 0.1
0.1 1 0.1 0.1 0.1 0.1
0.1 0.1 1 0.1 0.1 0.1
0.1 0.1 0.1 1 0.1 0.1
0.1 0.1 0.1 0.1 1 0.1
0.1 0.1 0.1 0.1 0.1 1
RANDOM_GROUP
8 9 10
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1 0.1 0.1 0.1 0.1 0.1
0.1 1 0.1 0.1 0.1 0.1
0.1 0.1 1 0.1 0.1 0.1
0.1 0.1 0.1 1 0.1 0.1
0.1 0.1 0.1 0.1 1 0.1
0.1 0.1 0.1 0.1 0.1 1
test.dat1: example data set using Legendre polynomial
1 1 21.10000 12.10000 11 -1.73205 2.23607 0
2 2 22.20000 12.20000 12 -1.23718 .59324 1
1 3 21.30000 12.30000 13 -.74231 -.50197 1
2 1 22.10000 12.40000 14 -.24744 -1.04958 0
1 2 21.20000 12.10000 15 .24744 -1.04958 1
2 3 22.30000 12.20000 16 .74231 -.50197 1
1 4 21.40000 12.30000 17 1.23718 .59324 2
2 5 22.50000 12.40000 18 1.73205 2.23607 3
test.dat2: example data set using linear spline
1 1 21.100000 12.100000 11 1.000000 .000000 .000000
2 2 22.200000 12.200000 12 .666667 .333333 .000000
1 3 21.300000 12.300000 13 .333333 .666667 .000000
2 1 22.100000 12.400000 14 .000000 1.000000 .000000
1 2 21.200000 12.100000 15 .000000 .750000 .250000
2 3 22.300000 12.200000 16 .000000 .500000 .500000
1 4 21.400000 12.300000 17 .000000 .250000 .750000
2 5 22.500000 12.400000 18 .000000 .000000 1.000000 

Random regression model with different order

DATAFILE
test.dat1
NUMBER_OF_TRAITS
2
NUMBER_OF_EFFECTS
8
OBSERVATION(S)
3 4
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 1 2 cross
6 6 1 cov
7 7 1 cov
2 2 5 cross
6 6 5 cov 2 2
7 7 5 cov 2 2
2 2 10 cross
6 6 10 cov 2 2
RANDOM_RESIDUAL VALUES
10 1
1 5
RANDOM_GROUP
4 5 6
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
1 0.1 0.1 0.1 0.1 0.1
0.1 1 0.1 0.1 0.1 0.1
0.1 0.1 1 0.1 0.1 0.1
0.1 0.1 0.1 1 0.1 0.1
0.1 0.1 0.1 0.1 1 0.1
0.1 0.1 0.1 0.1 0.1 1
RANDOM_GROUP
7 8
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1 0.1 0.1 0.1
0.1 1 0.1 0.1
0.1 0.1 1 0.1
0.1 0.1 0.1 1

Maternal Random regression model with different order

DATAFILE
test.dat1
NUMBER_OF_TRAITS
2
NUMBER_OF_EFFECTS
10
OBSERVATION(S)
3 4
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 1 2 cross
6 6 1 cov
7 7 1 cov
2 2 10 cross
6 6 10 cov 2 2
7 7 10 cov 2 2
8 8 10 cross
6 6 10 cov 8 8
8 8 10 cross
6 6 10 cov 8 8
RANDOM_RESIDUAL VALUES
10 1
1 5
RANDOM_GROUP
4 5 6 7 8
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1
0.1 1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1
0.1 0.1 1 0.1 0.1 0.1 0.1 0.1 0.1 0.1
0.1 0.1 0.1 1 0.1 0.1 0.1 0.1 0.1 0.1
0.1 0.1 0.1 0.1 1 0.1 0.1 0.1 0.1 0.1
0.1 0.1 0.1 0.1 0.1 1 0.1 0.1 0.1 0.1
0.1 0.1 0.1 0.1 0.1 0.1 1 0.1 0.1 0.1
0.1 0.1 0.1 0.1 0.1 0.1 0.1 1 0.1 0.1
0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 1 0.1
0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 1
RANDOM_GROUP
9 10
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
1 0.1 0.1 0.1
0.1 1 0.1 0.1
0.1 0.1 1 0.1
0.1 0.1 0.1 1

Random regression model with heterogeneous residual variances

### using airemlf90

# Example 1: with intercept
DATAFILE
test.dat
NUMBER_OF_TRAITS
1
NUMBER_OF_EFFECTS
9
OBSERVATION(S)
3
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 2 cross
6 1 cov
7 1 cov
5 5 cross
6 5 cov 5
7 5 cov 5
5 10 cross
6 10 cov 5
7 10 cov 5
RANDOM_RESIDUAL VALUES
10
RANDOM_GROUP
4 5 6
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
1 0.1 0.1
0.1 1 0.1
0.1 0.1 1
RANDOM_GROUP
7 8 9
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1 0.1 0.1
0.1 1 0.1
0.1 0.1 1
OPTION hetres_pos 6 7
OPTION hetres_pol 4.0 1.0 0.1
### using airemlf90

# Example 2: with no intercept
DATAFILE
test.dat
NUMBER_OF_TRAITS
1
NUMBER_OF_EFFECTS
7
OBSERVATION(S)
3
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 2 cross
6 1 cov
7 1 cov
6 5 cov 5
7 5 cov 5
6 10 cov 5
7 10 cov 5
RANDOM_RESIDUAL VALUES
10
RANDOM_GROUP
4 5
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
1 0.1
0.1 1
RANDOM_GROUP
6 7
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1 0.1
0.1 1
OPTION hetres_pos 6 7
OPTION hetres_pol 1.0 0.1
### using gibbs3f90

DATAFILE
test.dat
NUMBER_OF_TRAITS
1
NUMBER_OF_EFFECTS
9
OBSERVATION(S)
3
WEIGHT(S)
EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT [EFFECT NESTED]
1 2 cross
6 1 cov
7 1 cov
5 5 cross
6 5 cov 5
7 5 cov 5
5 10 cross
6 10 cov 5
7 10 cov 5
RANDOM_RESIDUAL VALUES
10
RANDOM_GROUP
4 5 6
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
1 0.1 0.1
0.1 1 0.1
0.1 0.1 1
RANDOM_GROUP
7 8 9
RANDOM_TYPE
add_animal
FILE
animal.ped
(CO)VARIANCES
1 0.1 0.1
0.1 1 0.1
0.1 0.1 1
OPTION hetres_int 8 5 

Competitive model

DATAFILE
competition.dat
NUMBER_OF_TRAITS
1
NUMBER_OF_EFFECTS
19
OBSERVATION(S)
24
WEIGHT(S)

EFFECTS: POSITIONS_IN_DATAFILE NUMBER_OF_LEVELS TYPE_OF_EFFECT[EFFECT NESTED]
2 88 cross
3 362 cross
21 2409 cross
4 8004 cross
22 0 cov 5
22 0 cov 6
22 0 cov 7
22 0 cov 8
22 0 cov 9
22 0 cov 10
22 0 cov 11
22 0 cov 12
22 0 cov 13
22 0 cov 14
22 0 cov 15
22 0 cov 16
22 0 cov 17
22 0 cov 18
22 8004 cov 19
RANDOM_RESIDUAL VALUES
1225.8
RANDOM_GROUP
4 5
RANDOM_TYPE
add_animal
FILE
renadd04.ped
(CO)VARIANCES
267.03 25.313
25.313 104.44
RANDOM_GROUP
2
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
89.187
RANDOM_GROUP
3
RANDOM_TYPE
diagonal
FILE

(CO)VARIANCES
167.34