Dear Statalist,
I have an old question, which command should I use for two-way fixed effects? For example if I want to control both year and firm fixed effects. I find two methods as follows:
1)
. egen dummy = group(firm year)
. xi: reg quantity price i.dummy
and 2)
. xi: reg quantity price i.firm i.year
I find the two methods gave the same estimation of coefficient, but method 2) seems to yield a large t-stat. Could someone please advise which one should I use?
Many thanks!
Martin
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/