yield ~ mu variety mv !r blocks

a*b is expanded to a b a.b

a*b*c*d is expanded to

a b c d a.b a.c a.d b.c b.d c.d a.b.c a.b.d a.c.d b.c.d a.b.c.d

a/b is expanded to a a.b

yield ~ site site.(lin(row) !r variety),

at(site,1).(row .3 col .2) expands to

yield ~ site site.lin(row) !r site.variety,

at(site,1).row .3 at(site,1).col .2

at(

at(site,1).geno at(site,2).geno at(site,3).geno, each with 10 levels,

This is similar to forming an interaction except that a separate model term is created for each level of the first factor; this is useful for random terms when each component can have a different variance. The same effect is achieved by using an interaction (e.g. site.geno) and associating a DIAG variance structure with the first component.

Trait.male -Trait.female and(Trait.female) The last column in the table indicates whether the term is typically used as a fixed term, a random term, or both. More information on the function is available behind this word.

Reserved model terms | ||

mu | constant term or intercept | fixed |

mv | a term to estimate missing values | fixed |

Trait | multivariate counterpart to mu | fixed |

units | forms a factor with a level for each experimental unit | random |

Operators | ||

: | placed between labels to specify an interaction | both |

/ | forms nested expansion | both |

* | forms factorial expansion | fixed |

- | placed before model terms to exclude them from the model | both |

, | at the end of a line indicates the model specification continues on the next line | both |

- | treated as a space | both |

!{ ... !} | placed around some model terms when it is important the terms not be reordered | random |

Common functions | ||

at(f,n)
| condition on level n of
factor f.
n may be a list of values | both |

at(f)
| forms conditioning covariables for all levels of factor f | both |

fac(v)
| forms a factor from v with a level for each unique value in
v | both |

fac(v,y)
| forms a factor with a level for each combination of values in v
and y | random |

lin(f)
| forms a variable from the factor f with values equal
to 1... n corresponding to
level(1) ... level( n) of the factor | both |

spl(v)
spl( v,k)
| forms
the design matrix for the random component of a cubic
spline for variable v | random |

other functions | ||

and(t)
and( t,r) |
adds r times the design matrix
for model term t to the previous design matrix;
r has a
default value of 1.
| both |

c(f)
con( f)
| factor f is fitted
with sum to zero constraints | fixed |

cos(v,r) |
forms cosine from v with
period r | fixed |

ge(f,r)
| condition on factor/variable f >=
r | fixed |

giv(f,n)
| associates the nth
.giv G-inverse with the
factor f | random |

gt(f,r)
| condition on factor/variable f > r | fixed |

h(f)
| factor f is fitted
with Helmert constraints | fixed |

ide(f)
| fits pedigree
factor f without relationship matrix
| random |

inv(v)
inv( v,r)
| forms reciprocal of v + r | fixed |

le(f,r)
| condition on factor/variable f <= r | fixed |

leg(v,[-]n)
| forms n+1 legendre
polynomials of order 0 (intercept), 1 (linear) ... n from the
values in v; the intercept polynomial is
omitted if v is preceded by the negative
sign. | fixed |

lt(f,r)
| condition on factor/variable f < r | fixed |

log(v[,r])
| forms natural logarithm of v + r | fixed |

ma1(f)
| constructs MA1 design matrix for
factor f | random |

ma1 | forms an MA1 design matrix from plot numbers | random |

out(n)
| condition on observation n | fixed |

out(n,t)
| condition on record n,
trait t | fixed |

pol(v,[-]n)
| forms n+1 orthogonal
polynomials of order 0 (intercept), 1 (linear) ... n from the
values in v; the intercept polynomial is
omitted if n is preceded by the negative sign. | both |

pow(v,p[,r])
| raises v + r to
power p | fixed |

qtl(f,r)
| impute a covariable from marker map information at position r | fixed |

sin(v,r)
| forms sine from v with
period r | both |

sqrt(f[,r])
| forms square root of v + r | fixed |

uni(f)
| forms a factor with a level for each record where
factor f is non-zero | random |

uni(f,n)
| forms a factor
with a level for each record where factor f has
level n | random |

xfa(f,k)
| is formally a copy of
factor f
with k extra levels. This is used when fitting extended
factor analytic models ( XFA,
of order k. | random |

fits a model with a constant and fixed variety effects yield ~ mu variety !r block

fits a saturated model with fixed time and variety main effects and time by variety interaction effects livewt ~ mu breed sex breed.sex !r sire

fits a model with fixed breed, sex and breed by sex interaction effects and random sire effects firmness ~ mu treat*time !r spl(time) fac(time) treat.spl(time)

fits separate spline curves for each treatment.