Hello!
I wonder is it possible to have firm, industry and year fixed effects all together in one model. I read https://www.statalist.org/forums/for...fects-together and I agree with the discussion that if putting all 3 fixed effects together
the model would omit the industry fixed effects, because industry is totally determined by the firm variables appearing before it in the model. I tried that myself in my own model and indeed all the industries are omitted. And the model is incredibly long as it has fixed effects for each firm and there are more than 20,000 firms.
Then I see another post https://www.statalist.org/forums/for...-fixed-effects that include firm fixed effects and industry-times-year fixed effects. Does that mean the 3 fixed effects can be put together as long as 2 of them are timed together? And what does the timed fixed effect mean?
The code given in that post is
I tried this but when I run "egen industryXyear = group(industry, year), label" stata gives me "invalid syntax r(198)", so I think of another code using reg rather than xtreg. It indeed gives me some results, none of the fixed effects are omitted, but is that logically correct? And if so, how to interpret the industry-times-year fixed effects?
Thanks a lot for any suggestions!
I wonder is it possible to have firm, industry and year fixed effects all together in one model. I read https://www.statalist.org/forums/for...fects-together and I agree with the discussion that if putting all 3 fixed effects together
Code:
reg y x1 x2 x3 i.firm i.industry i.year
Then I see another post https://www.statalist.org/forums/for...-fixed-effects that include firm fixed effects and industry-times-year fixed effects. Does that mean the 3 fixed effects can be put together as long as 2 of them are timed together? And what does the timed fixed effect mean?
The code given in that post is
Code:
egen industryXyear = group(industry, year), label xtset firm xtreg y x1 x2 x3 i.industryXyear
Code:
reg y x1 x2 x3 i.industry##i.year ,vce(cluster firm)
Thanks a lot for any suggestions!
Comment