# Omit continuous variable in categorical by continuous interaction

I'm trying to understand whether excluding the main effect of income in this specification is valid. Gender is a 0/1 variable whether the individual is male/female. Income and NetWorth are continuous.

NetWorth = β0 + β1×Gender + β2×(Gender×Income) + ϵ

According to What happens if you omit the main effect in a regression model with an interaction? | Stata FAQ, it seems to be properly specified. But other posts are suggesting that it is misspecified.

The regression would produce two interaction terms and a main effect for gender. According to the OARC website, shouldn't the two estimated "simple" slopes be the relationship between the effect of income on the dependent variable split by gender? Including the full interaction would produce the difference between the two groups, but sometimes it may be clearer to show the simple slopes.

• The model you have given would seem to impose that for whichever category you encode as $0$, income does not impact the expected outcome. Is that reasonable?
– Dave
Commented May 20 at 19:19
• But considering example 2.1 in stats.oarc.ucla.edu/stata/faq/… it seems that the base category is actually included? Commented May 20 at 19:32
• Following up, the two estimated coefficients be the marginal effect of the variable income on net worth for each level of the variable gender. Commented May 20 at 19:39
• If you feed your model $(\text{woman}, 50000)$, $(\text{man}, 50000)$, $(\text{woman}, 150000)$, $(\text{man}, 150000)$, you will get three distinct net worth values, not four. For one of the genders, depending how you do the $0/1$ coding, income will not impact the expected net worth.
– Dave
Commented May 20 at 19:44

If you feed your model $$(\text{woman}, 50000)$$, $$(\text{man}, 50000)$$, $$(\text{woman}, 150000)$$, $$(\text{man}, 150000)$$, you will get three distinct net worth values, not four (assuming $$\hat\beta_2\ne 0$$). For one of the genders, depending how you do the $$0/1$$ coding, income will not impact the expected net worth. I do not find that reasonable, that either men or women have the same expected net worth no matter their income.

The coefficient on the interaction term says the difference between genders in how income impacts expected net worth. However, when you omit the income-only term, you force the income effect to be zero for one gender. Then, in the (reasonable) case that income impacts net worth for the other gender, you will get a difference.

I think it is obvious that income impacts net worth. It is less obvious that the income effect will be the same for men or women. That would be what you investigate when you include an income-only term in your model, the gender difference in how imcome impacts net worth, and this will be data-driven instead of fixing one of the genders to have no income effect.

I guess I am reiterating Dave's answer, but with a little more details for future readers.

One way to look at a linear model with one categorical and one continuous variable, NW = b0 + b1xGender + b2xincome, is that you are actually fitting two lines instead of one, one line for the males, and one line for the females, where the two lines will be parallel and have different intercepts (let's assume you encode 0 to male and 1 to female).

NW_male = b0 + b2xincome

NW_female = (b0 + b1) + b2xincome

What interaction does is actually give you one more degree of freedom, instead of fitting two parallel lines, now each line can have its own slope.

Now, by removing the income main effect, the only "source" of slope will be the interaction term, which will be zeroed in the case of male, so basically, in case of males, you can only fit a horizontal line. Trying to change your encoding to 1 and 2 while fundamentally wrong, also won't work, because you're still stuck with only two degrees of freedom instead of three, and all you did was force the female model to have double the slope of the male model.

Despite these issues, whether an effect hierarchy is essential or not, it is open for discussion (specially in designed experiments). However, packages like jmp will prompt you twice if you try to include an interaction without its effects, but it will still let you proceed.

Technically, what Dave posted was right. I was confused about the notation OARC was using in Stata. Their notation in Stata (changed to this example) is regress networth i.gender i.gender#c.income. The i. notation creates separate dummies for each category. So the actual equation they're estimating is

NetWorth = β0 + β1×Male + β2×Female + β3×(Male×Income) + β4×(Female×Income) + ϵ

where male and female are both coded as 0/1. This specification leads to essentially the same estimates as the interacted model, i.e., regress networth i.gender##c.income.

• Commented May 21 at 14:29
• You should eliminate $\beta_0$ if you do things this way. The reason is that Male + Female = 1, so you have exact multicollinearity of the design matrix. Commented May 21 at 18:29