cufejinrong 发表于 2011-6-6 11:02
我想知道的其实是stata内置fe的算法。我看Introduction to Modern Econometrics Using Stata一书里写的fe算法就是像我上面写的,但它的截距项是怎么来的?
**方法1:
ta id,g(_id)
reg y x* _id*,noc
**方法2:
xtreg y x*,i(id) fe
********
方法2中_cons系数为方法1中_id*各系数的加权平均值,或者说是,各个体效应的加权平均值(权数即各id值出现的频率,或各panel的观测值数比重)。
对于balanced panels,_cons系数即_id*各系数(或各个体效应)的算术平均值。