Skip to content
Prev 9485 / 63421 Next

contrasts

Torsten Hothorn <Torsten.Hothorn@rzmail.uni-erlangen.de> writes:
That's not what it does. It just allows you to give the vector of
levels instead of the count. At the moment, this seems to be used only
for labeling:
3 2 1
4 0 0 0
3 1 0 0
2 0 1 0
1 0 0 1

Notice that C() allows a matrix argument, so even if model.matrix
doesn't use this feature, you could still use y~C(g,contr.xxx(levs))
in modeling.

One place where something like this might be useful, but (one of my
ancient gripes) isn't, is for generating polynomial contrasts over a
non-equidistant level set.