User Guide

113
Categorical Variable Coding Schemes
Suppose that factor has four categories. The resulting contrast matrix will be
Helmert
Helmert contrasts. Compares categories of an independent variable with the mean of
the subsequent categories. The general matrix form is
where k is the number of categories of the independent variable. For example, an
independent variable with four categories has a Helmert contrast matrix of the
following form:
( 1/4 1/4 1/4 1/4 )
(1 1 0 0 )
(0 1 1 0 )
(0 1 0 1 )
mean ( 1/
k 1/k ... 1/k 1/k )
df(1) ( 1 –1/(k–1) ... –1/(k–1) –1/(k–1))
df(2) ( 0 1 ... –1/(k–2) –1/(k–2))
..
..
df(k2) ( 0 0 1 –1/2 –1/2)
df(k–1) ( 0 0 ... 1 –1)
( 1/4 1/4 1/4 1/4 )
( 1 –1/3 –1/3 –1/3 )
( 0 1 –1/2 –1/2 )
(0 0 1 –1 )