3
$\begingroup$

Suppose we create a dummy variable male (1=male, 0=female) and dummy variable female (1=female, 0=male). Does the dummy variable trap, also occur, if we include them into interaction terms:

$Y_i = β_0 + β_1 male_i * interaction_i + β_2 female_i * interaction_i + u_i$

My intuition is that we have a dummy variable trap. We try to estimate three parameters, but providing in that particular regression only information for two parameters. Is that intuition correct or does an interaction term change the way we think about the dummy variable trap?

$\endgroup$
4
  • 3
    $\begingroup$ Since the interaction will have all 0 values, it will be a constant/useless value which the model won't be able to estimate anyway. $\endgroup$ Oct 17, 2023 at 9:01
  • 1
    $\begingroup$ @user2974951 The model is identified, so if you ask your favorite software to estimate this exact model, it will give you estimates. However, it probably does not mean what Marlon thinks it means. $\endgroup$ Oct 17, 2023 at 12:51
  • 1
    $\begingroup$ @user2974951 Ah, you interpret $interaction$ as $male \times female$. I interpret $interaction$ as another continuous variable. This is something Marlon needs to clarify. $\endgroup$ Oct 17, 2023 at 13:00
  • $\begingroup$ Right, I meant interaction to be another continuous variable. $\endgroup$ Oct 19, 2023 at 6:50

1 Answer 1

4
$\begingroup$

What is missing is the main effect of gender, but otherwise this is a viable model. One of the following models are probably what you are looking for:

$Y_i = β_0 + β_1 male_i * interaction_i + β_2 female_i * interaction_i + \beta_3 male + u_i$

or

$Y_i = β_0 + β_1 male_i * interaction_i + β_2 female_i * interaction_i + \beta_3 female + u_i$

or

$Y_i = β_1 male_i * interaction_i + β_2 female_i * interaction_i + \beta_3 male + \beta_4 female + u_i$

It does not matter which one you choose, they are equivalent. They are just different representations of the exact same model.

You can read more here:

https://journals.sagepub.com/doi/pdf/10.1177/1536867X1201200111

$\endgroup$
1
  • $\begingroup$ Thanks Maarten! So If I understand correctly, we are breaking the interaction variable into its effect for male/female, right? And if I wanted to test, let's say in your first suggestion, whether the effect of interaction variable is different for female and male, I would probably need to compare β1 and β2. Until now I only knew models like: $Y_i = β_0 + β_1 female_i + β_2 interaction_i + β_3 female_i * interaction_i + u_i$, so basically the thing R is doing when you code two variables with * inbetween. But I still wonder, what the difference between those models is. $\endgroup$ Oct 17, 2023 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.