I compared results from using
(1) xtset id year
xtreg var1 var2 var3, fe
and OLS with demeaned (by id) versions of the same variables
(2) reg var1_demean var2_demean var3_demean
My prior was that, the estimation results should be exactly the same. However, though fairly close, they are not identical. Why these two commands give different results?
(1) xtset id year
xtreg var1 var2 var3, fe
and OLS with demeaned (by id) versions of the same variables
(2) reg var1_demean var2_demean var3_demean
My prior was that, the estimation results should be exactly the same. However, though fairly close, they are not identical. Why these two commands give different results?
Comment