# Explicit factor constraints

## con() function

con(`f`)
and
c(`f`)

apply `sum to zero` constraints to factor `f`. It is not appropriate for random factors and fixed factors with missing cells.
ASReml assumes you specify the correct
number of levels
for each factor.
The formal effect of the con() function is to form a model term
with the highest level formally equal to minus the sum of the preceding terms.
With `sum to zero` constraints,
a missing treatment level will generate a singularity but
in the first coefficient rather than in the coefficient
corresponding to the missing treatment. In this case,
the coefficients will not be readily interpretable.
When interacting constrained factors, all cells in the cross-tabulation
should have data.
## h() function

h(`f`)
requests ASReml to fit the model term for factor `f`
using Helmert constraints.
Neither Sum-to-zero nor Helmert constraints generate interpretable
effects if singularities occur. ASReml runs more efficiently
if no constraints are applied. Following is an example of helmert and sum-to-zero covariables
a factor with 5 levels.

H1 H2 H3 H4 C1 C2 C3 C4
F1 -1 -1 -1 -1 1 0 0 0
F2 1 -1 -1 -1 0 1 0 0
F3 0 2 -1 -1 0 0 1 0
F4 0 0 3 -1 0 0 0 1
F5 0 0 0 4 -1 -1 -1 -1

**Return to start**