Dummy Coding for ANCOVA

IKA

New Member
#1
Scenario:
1 continuous DV (current preference)
1 categorical IV (gender)
1 categorical covariate (previous preference: 1= like; 2= dislike; 3= neutral)

How do I dummy code the covariate in spss?

I don’t want to do a regression and/or use the covariate as a factor.

Is the following dummy coding correct?
DummyLike: Like = 1; Dislike = 0; Neutral = 0
DummyDislike: Like = 0; Dislike = 1; Neutral = 0
DummyNeutral: Like = 0; Dislike = 0; Neutral = 1

Do I then enter 3 covariates (vs. the original covariate which was called “previous preference” into the covariate box when I run the analysis in SPSS?

Thank you.
 

Karabiner

TS Contributor
#2
You do not enter 3 dummies for a categorical variable with 3 Levels, because 1
of the dummies is redundant (those who have zeros in dummy A and dummy B
MUST have a "1" in dummy C). So, leave one out (reference level).

I'd suggest that you also perfom an ANOVA with "previous preference" as a factor,
but only with main effects, i.e. without the gender*"previous Preference" interaction
(you can easily do it in the "model" section of the ANOVA window), and compare
the results with the ANOVA with 2 dummy-coded covariates.

With kind regards

Karabiner
 

IKA

New Member
#3
Hi Karabiner,

Thank you so much for your reply. So just to be clear I need to do:
DummyLike: Like = 1; Dislike = 0; Neutral = 0
DummyDislike: Like = 0; Dislike = 1; Neutral = 0
And then entere DummyLike and DummyDislike as 2 covariates?

Thank you for your suggestion on doing an ANOVA with "previous preference" as a factor; this is very helpful to me.

Best,
Ika
 
#4
Or in spss you can just code the variable “like” that is maybe coded as “a”, “b” or “c” or whatever, then you declare that as a “factor” (when doing the regression analysis or anova), then spss creates the dummys as Karabiner said.