User Guide

111
Appendix
A
Categorical Variable
Coding Schemes
In many SPSS procedures, you can request automatic replacement of a categorical
independent variable with a set of contrast variables, which will then be entered or
removed from an equation as a block. You can specify how the set of contrast variables
is to be coded, usually on the
CONTRAST subcommand. This appendix explains and
illustrates how different contrast types requested on
CONTRAST actually work.
Deviation
Deviation from the grand mean. In matrix terms, these contrasts have the form:
where k is the number of categories for the independent variable and the last category
is omitted by default. For example, the deviation contrasts for an independent variable
with three categories are as follows:
mean ( 1/k 1/k ... 1/k 1/k )
df(1) ( 1–1/k –1/k ... 1/k –1/k )
d f ( 2 ) ( 1 / k 1–1/k ... 1/k –1/k )
..
..
df(k–1) ( –1/
k –1/k ... 1–1/k –1/k )
( 1/3 1/3 1/3 )
( 2/3 –1/3 –1/3 )
( –1/3 2/3 –1/3 )