User Guide

115
Categorical Variable Coding Schemes
third group is three times that to the first group, the treatment categories are equally
spaced, and an appropriate metric for this situation consists of consecutive integers:
/CONTRAST(DRUG)=POLYNOMIAL(1,2,3)
If, however, the dosage administered to the second group is four times that given the
first group, and the dosage given the third group is seven times that to the first, an
appropriate metric is
/CONTRAST(DRUG)=POLYNOMIAL(1,4,7)
In either case, the result of the contrast specification is that the first degree of freedom
for drug contains the linear effect of the dosage levels and the second degree of
freedom contains the quadratic effect.
Polynomial contrasts are especially useful in tests of trends and for investigating the
nature of response surfaces. You can also use polynomial contrasts to perform
nonlinear curve fitting, such as curvilinear regression.
Repeated
Compares adjacent levels of an independent variable. The general matrix form is
where k is the number of categories for the independent variable. For example, the
repeated contrasts for an independent variable with four categories are as follows:
These contrasts are useful in profile analysis and wherever difference scores
are needed.
mean (1/k 1/k 1/k ... 1/k 1/k )
df(1) ( 1 –1 0 ... 0 0 )
df(2) ( 0 1 –1 ... 0 0 )
..
..
df(k–1) ( 0 0 0 ... 1 –1 )
(1/4 1/4 1/4 1/4 )
(1 1 0 0 )
(0 1 1 0 )
(0 0 1 1 )