Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: demened regression and FE are not the same


From   [email protected]
To   [email protected]
Subject   st: demened regression and FE are not the same
Date   Thu, 9 Feb 2006 13:37:02 -0500

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/



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