selection differentials, and the 1 means the matrix inverse. For two traits, labeled 1
and 2, equation (4.13) can be written in explicit matrix format as
D
z
1
D
z
2
¼
s
2
G1
s
G12
s
G21
s
2
G2
s
2
P1
s
P12
s
P21
s
2
P2
1
S
1
S
2
ð4:14Þ
The diagonal elements of the genetic and phenotypic matrices hold the variances
and the off-diagonals the covariances (note that the matrices are symmetrical and
hence s
ij
¼ s
ji
). The response to directional truncation selection is the same as in
the single trait model, in that both traits change by a fixed amount per generation,
though in this case the amount is a function of the selection differential and the
correlation between the traits.
To set the values in equation (4.14) it is generally easier to commence with the
heritabilities, phenotypic variances, and correlations, and then make use of
equations (4.3) and (4.12). For two traits the coding is simple: for example,
h2 <- c(0.2,0.4) # Set heritabilities
Vp <- c(1,2) # Set phenotypic variances
Rp <- 0.4 # Set phenotypic correlation
Ra <- 0.15 # Set genetic correlation
Va <- h2*Vp # Using h2 ¼Va/Vp
Covp <- Rp*sqrt(Vp[1]*Vp[2]) # Using r ¼ Cov/SD1SD2
Cova <- Ra*sqrt(Va[1]*Va[2]) # Using r ¼ Cov/SD1SD2
Gmatrix <- matrix( c(Va[1],Cova, Cova, Va[2]),2,2) # G matrix
Pmatrix <- matrix(c(Vp[1],Covp, Covp, Vp[2]),2,2) # P matrix
The environmental correlation must lie between 1andþ1, which is not
guaranteed by the above coding. It is therefore necessary to put in a check,
using equation (4.12) and stop the program if r
E
falls outside the permissible
limits:
# Check that Re is possible
Re <- (Rp-Ra*sqrt(h2[1]*h2[2]))/sqrt((1-h2[1])*(1-h2[2]))
if(abs(Re) >1 ) stop (c(“problem with Re”))
The value of the heritability is unlikely to matter in terms of the final equilibrium
but will certainly affect the time taken to reach this value, should it exist, and the
variation about the value.
With more than two traits the above coding can be tedious but it can be
replaced by the following more general code. Suppose we have three traits. First
we construct a matrix, which I have called H2, which holds the heritabilities on
the diagonal, the genetic correlations above the diagonal and the phenotypic
correlations below the diagonal. We then use this matrix in conjunction with
the phenotypic variances (assumed to be 1.5, 1.0, and 0.5 in the example below) to
construct the necessary covariance matrices:
226 MODELING EVOLUTION