[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: panel data- two way fixed effect specication
I had a query similar to this some while ago. The upshot was that you
cannot do this in Stata. However, as was pointed out, the fixed effects
model (aka least squares dummy variable model) is effectively just a model
with a dummy variable set for each group with the difference between this,
and an ordinary dummy variable set up, of the sum of the group dummies
equal to zero (rather than arbitrarily setting one group's dummy to zero).
On the basis of this (and forgetting about the time groups for the moment)
I ran my regression using 'xtreg, i(group) fe' then also ran it using reg
with dummy variables for the groups and got exactly the same regression
results for the non-group variables with the same standard errors etc with
the exception (naturally) of the constant. I chose which group's dummy to
set to zero on the basis of which choice made the sum of all group dummies
closest to zero. I then ran an F-Test on the joint significance of these
dummies and got the same answer as with the xtreg.
I then did the same with reg group dummies time dummies and xtreg time
dummies, i(group) fe and got the same answers for the non-group, non-time,
non-constant variables. Its not as pretty as an automatic command but I
think it does the trick.
Peter Haan wrote:
> is there a possibility to estimate a model with time and group specific
> fixed effects using stata (xtreg...,fe).
> yit= axit +Zi+ Kt+ u
> thank you for you help
> * 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/
tel;fax:01904 432 700
tel;work:01904 432 694
org:University of York;Centre for Health Economics