Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Two-way fixed effects


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Two-way fixed effects
Date   Sat, 26 Jun 2004 13:39:15 +0100

Tim Sass started a thread on a loosely similar
topic on 22 June. The answers in that thread
may appear here. 

Nick 
[email protected] 

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Bob Bifulco
> Sent: 25 June 2004 16:33
> To: [email protected]
> Subject: st: Two-way fixed effects
> 
> 
> I am working with a panel dataset and have tried 4 ways to 
> estimate a two
> way fixed effect that controls for year and group fixed 
> effects. (Hopefully
> you can follow my notation)
> 
> egen Yi.=mean(Yit), by(group);
> egen Y..=mean(Yit);
> egen Y.t=mean(Yit), by(year);
> 
> (1)  xi: xtreg y x i.year, i(group) fe;
> 
> (2)  reg y* x* year1* year2* . . . year5*;
> 	where y*=Yit-Yi.+Y.. and other * variables defined similarly)
> 
> (3)  reg y** x** year1** year2** . . . year5**, noconstant;
> 	where y**=Yit-Yi. and other ** variables defined similarly
> 
> (4)  reg y*** x***, no constant;
> 	where y***=Yit-Yi.-Y.t+Y.. and x*** defined similarly
> 
> (1) and (2) provide very similar, but exactly the same, coefficient
> estimates.  The estiamtes produced by (3) and (4)are both 
> different from
> each other and different from (1) and (2).  Can anyone 
> explain why each of
> these do not provide the same coefficient estimates.
> 
> *
> *   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/
> 

*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index