Variance Models

One G structures for more than one random term

The usual case is that a variance structure applies to a particular term in the linear model and that there is no covariance between model terms. Sometimes it is appropriate to include a covariance. Then, it is essential that the model terms be listed together and that the variance structure defined for the first term be the structure required for both terms. When the terms are of different size, the terms must be linked together with the !{ and !} qualifiers. While ASReml will check the overall size, it does not check that the order of effects matches the structure definition so the user must be careful to get this right. Check that the terms are conformable by considering the order of the fitted effects and ensuring the first term of the direct product corresponds to the outer factor in the nesting of the effects.

Two examples are
  • random regressions, where we want a covariance between intercept and slope
     ...
     !r !{ animal animal.time us(2 3 -0.5 2).animal !}
     ...
    
    is equivalent (though not identical because of the scaling differences) to
     ...
     !r us(pol(time,1)).animal
     ...
    
  • maternal/direct genetic covariance
      lambid !P
      sireid !P
      damid !P
     ...
      wwt ywt ~ Trait Trait.sex !r !{ Trait.lambid at(Trait,1).damid us(3).nrm(lambid) !}
     ...
    

    In the example,
    !r !{ animal animal.time !r !{ animal animal.time us(2 3 -0.5 2).animal !}
    the order of components in the
      us(2).animal
    term is critically important. For n animals, the solutions for
    animal animal.time
    appear as n animal effects followed by n animal.time effects which is 2 sets of n effects. The structure
      us(2).animal
    also implies 2 sets of n effects and therefore matches the order of the fitted effects. However,
      animal.us(2)
    implies n sets of 2 effects which does not match the model terms.

    Return to index