<p>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.</p>
<p>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):</p>
<p><span class="math-container">$$y_{it} = \alpha_i + \gamma (T_t*A_i) + \epsilon_{it} $$</span></p>
<p>where  <span class="math-container">$\alpha_i$</span> would be panel fixed  effects  <span class="math-container">$T_t*A_t$</span> would be interaction of a treatment period dummy <span class="math-container">$T_t$</span> which is 1 during treatment period and 0 outside treatment period and <span class="math-container">$A_i$</span> which is dummy for assignment in either treatment (1) or control group (0), and together the interaction term tells us if in a given <span class="math-container">$t$</span> and individual was recieving treatment <span class="math-container">$t$</span>. 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 <span class="math-container">$d_i*g_i$</span> 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)</p>
<p>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.</p>

CC BY-SA 4.0
2020-10-03T14:16:17.787Z
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 ?
Hustler885
CC BY-SA 4.0
2020-10-03T14:19:08.330Z
@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
CC BY-SA 4.0
2020-10-03T14:47:28.327Z
An Hausmann test could be helpfull in the choice ?
Hustler885
CC BY-SA 4.0
2020-10-03T14:55:20.783Z
@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
CC BY-SA 4.0
2020-10-03T16:14:24.300Z
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
Hustler885
CC BY-SA 4.0
2020-10-03T16:50:55.163Z
@Ema43 for example, between effects model.
1muflon1
CC BY-SA 4.0
2020-10-03T10:44:26.977Z
2020-10-03T10:44:26.977Z
1muflon1
<p>Yes, it is acceptable. Consider a <a href="https://en.wikipedia.org/wiki/Mincer_earnings_function" rel="nofollow noreferrer">Mincer wage equation</a>. Let's define a dummy variable <em>Female</em> taking on the value one for females and the value zero for males and a dummy variable <em>Married</em> 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 <strong>Female*Married</strong>. But be cautious, you must select a base group to avoid the <em><strong>dummy trap</strong></em>.</p>
<p>A good reference is the chapter &quot;Multiple Regression Analysis with Qualitative Information: Binary (or Dummy) Variables&quot; (Chapter 7) in Wooldridge <a href="https://economics.ut.ac.ir/documents/3030266/14100645/Jeffrey_M._Wooldridge_Introductory_Econometrics_A_Modern_Approach__2012.pdf" rel="nofollow noreferrer">Introductory Econometrics</a>.</p>

CC BY-SA 4.0
2020-10-03T14:19:13.587Z
Thanks for your response I'll surely have a look at the chapter.
Hustler885
CC BY-SA 4.0
2020-10-03T10:42:28.747Z
2020-10-03T10:42:28.747Z
emeryville
<p>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?</p>

<econometrics><applied-econometrics><paneldata>
Dummy Variables in Panel data
Hustler885
# Dummy Variables in Panel data

(Asked by: username_0 on 2020-10-03)

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?

**Tags:** econometrics, applied-econometrics, paneldata

---

## 2 answers

### Answer by username_1 on 2020-10-03. Score: 2 | Accepted answer

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.

> **Comments:**
> **username_0**: 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 ?  
> **username_1**: @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.  
> **username_0**: An Hausmann test could be helpfull in the choice ?  
> **username_1**: @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.  
> **username_0**: 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  
> **username_1**: @Ema43 for example, between effects model.  

---

### Answer by username_2 on 2020-10-03. Score: 2

Yes, it is acceptable. Consider a [Mincer wage equation](https://en.wikipedia.org/wiki/Mincer_earnings_function). 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](https://economics.ut.ac.ir/documents/3030266/14100645/Jeffrey_M._Wooldridge_Introductory_Econometrics_A_Modern_Approach__2012.pdf).

> **Comments:**
> **username_0**: Thanks for your response I'll surely have a look at the chapter.  

---

