TITLE(Contrast @@ Contrast Matrices)
USAGE(
contr.helmert(n, contrasts=TRUE)
contr.poly(n, contrasts=TRUE)
contr.sum(n, contrasts=TRUE)
contr.treatment(n, contrasts=TRUE)
)
ALIAS(contr.helmert)
ALIAS(contr.poly)
ALIAS(contr.sum)
ALIAS(contr.treatment)
VALUE(
A matrix with LANG(n) rows and LANG(k) columns,
with LANG(k=n-1) if LANG(contrasts) is LANG(TRUE)
and LANG(k=n) if LANG(contrasts) is LANG(FALSE).
PARA
These functions are used for creating contrast matrices
for use in fitting analysis of variance and regression models.
The columns of the resulting matrices contain contrasts
which can be used for coding a factor with LANG(n) levels.
The returned value contains the computed contrasts.
If the argument LANG(contrasts) is LANG(FALSE) then an
additional column of ones is prepended to the matrix.
)
SEEALSO(
LANG(LINK(contrasts)),
LANG(LINK(glm)),
LANG(LINK(lm)).
)
