# Controlling equation order

## !EQORDER

!EQORDER `o`

modifies the algorithm used for choosing the order for solving the
mixed model equations. A new algorithm devised for release 2 is now the default and is formally selected by
!EQORDER 3.
The algorithm used
for release 1 is essentially that selected by
!EQORDER 1.
The new order is generally superior.
!EQORDER -1
instructs
ASReml to process the equations in the order they are specified
in the model. Generally this will make a job much slower, if it can run at all.
It is useful if the model has a suitable order as in the IBD model

Y ~ mu !r !{ giv(id) id !}

giv(id)
invokes a dense inverse of an IBD matrix and
id
has a sparse structured inverse of an additive relationship matrix. While
!EQORDER 3
generates a more sparse solution,
!EQORDER -1
runs faster.
## !LAST `factor_1 lev_1 ` [ ` factor_2 lev_2 factor_3 lev_3 ` ]

limits the order in which equations are solved in ASReml by
forcing equations in the sparse partition involving the first `lev_i` equations of
`factor_i` to be solved after all other
equations in the sparse partition. Is intended for use when
there are multiple fixed terms in the sparse equations so that ASReml
will be consistent in which effects are identified as singular.
The test example had

!r Anim Litter !f HYS

where genetic groups were included in the definition of Anim.
Consequently, there were 5 singularities in Anim.
The default reordering allows those singularities to appear
anywhere in the Anim
and HYS terms.
Since 29 genetic groups were defined in Anim,
!LAST Anim 29 forces the genetic group equations to be absorbed last
(and therefore incorporate any singularities).
In the more general model fitting

!r Tr.Anim Tr.Lit !f Tr.HYS

without !LAST, the location of singularities will
almost surely change
if the G structures for Tr.Anim
or Tr.Lit are changed,
invalidating Likelihood Ratio tests between the models.
**Return to start**