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

In this discussion, @1muflon1 has a comprehensive answer 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, in his paper, he proposes something like controlling for firms and the interaction of industry * year fixed effects, does it answer my question above? @1muflon1 also explain this specification 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

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.

• 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. Jul 9, 2021 at 21:02
• "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 ? Jul 9, 2021 at 21:03
• "both" referred to (1) firm fixed effects and (2) industry fixed effects. Jul 10, 2021 at 11:13
• 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. Jul 10, 2021 at 11:14
• Then you can't simultaneously include firm and industry FE. Jul 10, 2021 at 11:20

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.

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

• 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? Jul 9, 2021 at 21:00
• In case it is not TWFE, but can it be claimed for "controlling for firm, industry, and year fixed effects"? Jul 9, 2021 at 21:06