# Dummy Variables in Panel data

I am building a regression model on some panel data of sales and I am rather new to econometrics. I was thinking of introducing some indipendent variables built as Dummy1*Dummy2 . Is this new interplay variable acceptable or is it going to lead to some estimation errors in the model?

Depends on what the dummies are and what is the specification of the model you are using. When you multiply two dummies you are creating what is called an interaction term.

Generally speaking you can include interaction terms in panel data. In fact the widely used differences-in-differences (DiD) estimator relies on it. A DiD can be specified as (see Mostly Harmless Econometrics by Angrist and Pischke):

$$y_{it} = \alpha_i + \gamma (T_t*A_i) + \epsilon_{it}$$

where $$\alpha_i$$ would be panel fixed effects $$T_t*A_t$$ would be interaction of a treatment period dummy $$T_t$$ which is 1 during treatment period and 0 outside treatment period and $$A_i$$ which is dummy for assignment in either treatment (1) or control group (0), and together the interaction term tells us if in a given $$t$$ and individual was recieving treatment $$t$$. Although the FE specification requires that any included variable has to vary across time so you could not include just an interaction of any dummies (some $$d_i*g_i$$ interaction would be time invariant and would not be possible to include it in FE model - although there are other panel models that could handle such interaction term as well)

However, it is always case specific. Just because it is possible to include interaction terms does not mean one should do that. Its not possible to give a precise advice without knowing all details of the research you are doing.

• Thanks a lot for the feedback. If I want to introduce dummies that are time invariant then I should opt for a random effect model ? Oct 3 '20 at 14:16
• @Ema43 yes everything else equal, although you should not choose model just based on this one single issue - thats why I mentioned it difficult to give precise advice.
– 1muflon1
Oct 3 '20 at 14:19
• An Hausmann test could be helpfull in the choice ? Oct 3 '20 at 14:47
• @Ema43 you can use hausmann test to help you choose between FE and RE. But also you should note there many more panel models not just those two.
– 1muflon1
Oct 3 '20 at 14:55
• I just knew pooled OLS( not feasible given that the individuals observed across time are the same) and FE and RE. Do you have any suggestion for a panel model that could accommodate interaction terms alternative to the RE model ? Thanks a lot Oct 3 '20 at 16:14

Yes, it is acceptable. Consider a Mincer wage equation. Let's define a dummy variable Female taking on the value one for females and the value zero for males and a dummy variable Married to equal one if a person is married and zero if otherwise. Then, you can estimate a model that allows for wage differences among four groups: married men, married women, single men, and single women. For this you need to interact the dummy variables, for instance Female*Married. But be cautious, you must select a base group to avoid the dummy trap.

A good reference is the chapter "Multiple Regression Analysis with Qualitative Information: Binary (or Dummy) Variables" (Chapter 7) in Wooldridge Introductory Econometrics.

• Thanks for your response I'll surely have a look at the chapter. Oct 3 '20 at 14:19