Does anyone know why the entity demened regression doe not give the same results
as the entitity dummy regression?
when I run
xtreg Y X , fe
areg Y X , a(id)
I gen the same answer. However, when I run
xi: reg Y i.id
predict Y1 , resid
xi: reg X i.id
predict X1 , resid
reg Y1 X1
I get a different answer. I have also explicity demened the variables using
foreach var of varlist X Y {
egen mean_`var'_id = mean(`var'), by(id)
gen demean_`var' = mean_`var'_id - `var'
}
reg demean_Y demean_X
This gives the same asnwer as the residual regression, but NOT the same as the
fixed effects or entity dummy regression.
Does anyone have any idea why this is the case?
Mathematically these 4 approaches are supposed to be identical.
*
* 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/