Grad Fellow Notes: Interaction Terms in STATA

Grad Fellow Notes: Interaction Terms in STATA

While using hashtags is simpler than generating the interaction term as a new variable, there is a necessary rule to remember: use the variable prefixes. In Stata, -i.[variable]- indicates that the variable is categorical, and -c.[variable]- indicates a continuous variable. Because the hashtag code assumes the variables in the interaction term are categorical, it is necessary to define numerical variables as numerical with the -c.- prefix.
Wage = β0 + β1Education + β2Minority + β3Education*Minority + ε