10. Dummy variable
• Category variable
• Set reference group
• Set N-1 d.variables:
– 1 if xij belongs to the group specified
– 0 if xij belongs to other groups
• E.g. variable drug in the example:
– 0 0 0 => drug=1
– 1 0 0 => drug=2
– 0 1 0 => drug=3
– 0 0 1 => drug=4
13. Why use d.v. coding?
http://www.sas.com/offices/NA/canada/downloads/presen
tations/VancouverMay11/Variable.pdf
14.
15. If you cannot run contrast
analysis──
• Check coefficients
• Separate main effects and interactions into
different models.
• e.g. 2-way ANOVA with interaction:
– model y = A B;
(contrasts for main effects)
– model y = A*B;
(contrasts for interaction)