We can then define the phenotypic variance and the heritability by referring to the direct additive genetic variance either as component ‘2’ or as ‘us(2).nrm(pig);us(2)[1]’. The suffix ‘[1]’ distinguishes the first variance component of this complex term in the output. Similarly, the covariance between direct additive and maternal effects is referred to as either component ‘3’ or ‘us(2).nrm(pig);us(2)[2]’.
The heritability definitions can then be added after the VPREDICT !DEFINE command and the .as file can be re-run to get the estimates:
Code example 4.5: Animal model for pig data, continued (Code04-‐5_AnimalModel.as)