<p>Suppose we don't have a constant.
Including firm and industry fixed effects means including a dummy variable for all firms, and also a dummy variable for all industries.</p>
<p>If the set of firms in an industry never changes, there is a multicollinearity violation, as the sum of all dummy variables for firms in an industry is equal to the dummy variable for the industry.</p>
<p>Including firm and industry*year fixed effects means including a dummy variable for all firms, and also a dummy variable for all industry-year combinations.</p>
<p>If the set of firms in an industry never changes, there is again a multicollinearity violation, as the sum of all dummy variables for firms in an industry is equal to the sum of all dummy variables for the industry-years for the industry.</p>
<p>If firms change the industry they are in over time, conceivably you could include them both. The best I can think is that a paper might show several regressions, with the first having industry FE and later with firm FE.</p>

CC BY-SA 4.0
2021-07-09T21:02:42.357Z
Hi Michael, thank you, can you explain more regarding this part "***If the set of firms in an industry never changes, there is again a multicollinearity violation, as the sum of all dummy variables for firms in an industry is equal to the sum of all dummy variables for the industry-years for the industry***", I did not fully understand it.
Phil Nguyen
CC BY-SA 4.0
2021-07-09T21:03:37.443Z
"***If firms change the industry they are in over time, conceivably you could include them both***", can I ask what does "both" here mean then ?
Phil Nguyen
CC BY-SA 4.0
2021-07-10T11:13:24.993Z
"both" referred to (1) firm fixed effects and (2) industry fixed effects.
Michael Gmeiner
CC BY-SA 4.0
2021-07-10T11:14:16.067Z
Suppose have 4 firms: {a,b,c,d}, 2 industries: {j,k}, and 2 time periods: {2000,  2001}. Suppose that firms a and b are in industry j while firms c and d are in industry k.


The dummy variables for firms a and b add up to 1 for every observation that is either a or b. The dummy variables for firms a and b add up to 0 for every observation that is either c or d.

The dummy for industry j in 2000 + the dummy for industry j in 2001 adds up to 1 for every observation that is firm a or b, and adds up to 0 for every observation that is c or d.
Michael Gmeiner
CC BY-SA 4.0
2021-07-10T11:16:56.383Z
In my case the firm is assumed to stay in one industry since the beginning till the end of sample period
Phil Nguyen
CC BY-SA 4.0
2021-07-10T11:20:30.803Z
Then you can't simultaneously include firm and industry FE.
Michael Gmeiner
CC BY-SA 4.0
2021-07-09T19:56:40.067Z
2021-07-09T19:56:40.067Z
Michael Gmeiner
<blockquote>
<p>Have you ever seen any paper controlling for firm, industry, and year fixed effect at the same time?</p>
</blockquote>
<p>You literally cite the Dasgupsta et al who does it, so anyone looking at that study seen one, but if you ask other than the Dagsputa study yes for example:</p>
<p><a href="https://www.sciencedirect.com/science/article/abs/pii/S0094119007000630" rel="nofollow noreferrer">Combes, P. P., Duranton, G., &amp; Gobillon, L. (2008). Spatial wage disparities: Sorting matters!. Journal of urban economics, 63(2), 723-742.</a></p>
<p>The study above uses area-year fixed effect interactions and in some even industry-year fixed effect (see pp 727).</p>

CC BY-SA 4.0
2021-07-09T21:00:21.803Z
but it seems that you said controlling firms fixed effect and interaction between year and industry fixed effect is not a kind of two-way fixed effect, am I explaining wrongly?
Phil Nguyen
CC BY-SA 4.0
2021-07-09T21:06:00.207Z
In case it is not TWFE, but can it be claimed for "***controlling for firm, industry, and year fixed effects***"?
Phil Nguyen
CC BY-SA 4.0
2021-07-09T12:25:13.597Z
2021-07-09T12:25:13.597Z
1muflon1
<p>In this discussion, @1muflon1 has a <a href="https://economics.stackexchange.com/questions/45695/what-are-the-difference-between-industry-fixed-effects-and-industryyear-fixed-e">comprehensive answer</a> about some commonly-used fixed effects. <strong>I am wondering how to do industry and year fixed effect but still having firm fixed effect</strong>? If we do these three fixed effects together, it should become a three-way fixed effect and I do not think it is properly.</p>
<p>Actually, I did, and the result when <strong>controlling for firms and year fixed effects</strong> and <strong>controlling for these three fixed effects</strong> are similar.</p>
<p><a href="https://academic.oup.com/rfs/article-abstract/32/7/2587/5079300?redirectedFrom=fulltext" rel="nofollow noreferrer">Dasgupsta, 2019, Table 2, column 4</a>, in his paper, he proposes something like <strong>controlling for firms and the interaction of industry * year fixed effects</strong>, does it answer my question above?
@1muflon1 also <a href="https://economics.stackexchange.com/a/45701/33142">explain this specification</a> as</p>
<blockquote>
<p>this is not the same as controlling for fixed year and industry
effects at the same time, this is something extra, to see if there is
some extra yearly effect that affects all industries in different way.
For example recession occurring in year 2020 could on average have
negative effect on all companies but some industries can benefit from
recession</p>
</blockquote>

<econometrics>
Have you ever seen any paper controlling for firm, industry, and year fixed effect at the same time?
Phil Nguyen
# Have you ever seen any paper controlling for firm, industry, and year fixed effect at the same time?

(Asked by: username_0 on 2021-07-09)

In this discussion, @username_2 has a [comprehensive answer](https://economics.stackexchange.com/questions/45695/what-are-the-difference-between-industry-fixed-effects-and-industryyear-fixed-e) about some commonly-used fixed effects. **I am wondering how to do industry and year fixed effect but still having firm fixed effect**? If we do these three fixed effects together, it should become a three-way fixed effect and I do not think it is properly.

Actually, I did, and the result when **controlling for firms and year fixed effects** and **controlling for these three fixed effects** are similar.

[Dasgupsta, 2019, Table 2, column 4](https://academic.oup.com/rfs/article-abstract/32/7/2587/5079300?redirectedFrom=fulltext), in his paper, he proposes something like **controlling for firms and the interaction of industry \* year fixed effects**, does it answer my question above?
@username_2 also [explain this specification](https://economics.stackexchange.com/a/45701/33142) as

> this is not the same as controlling for fixed year and industry
> effects at the same time, this is something extra, to see if there is
> some extra yearly effect that affects all industries in different way.
> For example recession occurring in year 2020 could on average have
> negative effect on all companies but some industries can benefit from
> recession

**Tags:** econometrics


---

## 2 answers

### Answer by username_1 on 2021-07-09. Score: 1 | Accepted answer

Suppose we don't have a constant.
Including firm and industry fixed effects means including a dummy variable for all firms, and also a dummy variable for all industries.

If the set of firms in an industry never changes, there is a multicollinearity violation, as the sum of all dummy variables for firms in an industry is equal to the dummy variable for the industry.

Including firm and industry\*year fixed effects means including a dummy variable for all firms, and also a dummy variable for all industry-year combinations.

If the set of firms in an industry never changes, there is again a multicollinearity violation, as the sum of all dummy variables for firms in an industry is equal to the sum of all dummy variables for the industry-years for the industry.

If firms change the industry they are in over time, conceivably you could include them both. The best I can think is that a paper might show several regressions, with the first having industry FE and later with firm FE.

> **Comments:**
> **username_0**: Hi Michael, thank you, can you explain more regarding this part "***If the set of firms in an industry never changes, there is again a multicollinearity violation, as the sum of all dummy variables for firms in an industry is equal to the sum of all dummy variables for the industry-years for the industry***", I did not fully understand it.  
> **username_0**: "***If firms change the industry they are in over time, conceivably you could include them both***", can I ask what does "both" here mean then ?  
> **username_1**: "both" referred to (1) firm fixed effects and (2) industry fixed effects.  
> **username_1**: Suppose have 4 firms: {a,b,c,d}, 2 industries: {j,k}, and 2 time periods: {2000,  2001}. Suppose that firms a and b are in industry j while firms c and d are in industry k.   The dummy variables for firms a and b add up to 1 for every observation that is either a or b. The dummy variables for firms a and b add up to 0 for every observation that is either c or d.  The dummy for industry j in 2000 + the dummy for industry j in 2001 adds up to 1 for every observation that is firm a or b, and adds up to 0 for every observation that is c or d.  
> **username_0**: In my case the firm is assumed to stay in one industry since the beginning till the end of sample period  
> **username_1**: Then you can't simultaneously include firm and industry FE.  

---

### Answer by username_2 on 2021-07-09. Score: 1

> Have you ever seen any paper controlling for firm, industry, and year fixed effect at the same time?

You literally cite the Dasgupsta et al who does it, so anyone looking at that study seen one, but if you ask other than the Dagsputa study yes for example:

[Combes, P. P., Duranton, G., & Gobillon, L. (2008). Spatial wage disparities: Sorting matters!. Journal of urban economics, 63(2), 723-742.](https://www.sciencedirect.com/science/article/abs/pii/S0094119007000630)

The study above uses area-year fixed effect interactions and in some even industry-year fixed effect (see pp 727).

> **Comments:**
> **username_0**: but it seems that you said controlling firms fixed effect and interaction between year and industry fixed effect is not a kind of two-way fixed effect, am I explaining wrongly?  
> **username_0**: In case it is not TWFE, but can it be claimed for "***controlling for firm, industry, and year fixed effects***"?  

---

