Hi all,
A small query....re. interactions concerning dummy variables and their
interpretation in a model.
I have 2 binary variables. One has categories "male" (1), "female" (0);
the other has categories ">35 years" (1) and "<35 years" (0).
Say, in a hypothetical example, we have the following data
Sex age
1 0
1 1
0 0
1 1
1 1
0 1
0 0
I form an interaction like so:
Sex*age
0
1
0
1
1
0
0
Now, here for the sex*age interaction a '1' is formed only when a person
is 'male' and >35 years....hence we only get a contribution to the
fitted value in a model from the interaction term for males over 35.
How can we evaluate the contribution to a model from the individuals who
are 'female and >35'; 'male and <35' and 'female and <35' when, as we
can see, their contribution to the model (for the interaction)using this
coding scheme is zero ?
As an alternative, would it be correct to generate a categorical
variable with the following codes:
<35 and male 1
>35 and male 2
<35 and female 3
>35 and female 4
And then for modelling create 3 dummy variables like so:
<35 and male 1 0 0
>35 and male 0 1 0
<35 and female 0 0 1
>35 and female 0 0 0
Many thanks,
Kim.
|