gainend 发表于 2012-10-17 09:28 
这按公司的估计,如何同时按年和公司估计出好几千个同样的值?
你是不是说每家公司每年都有一串数据,然后你希望在每年每家公司里都构建一个回归方程?
statsby , by(year firm):regress y x
then, you will get a new data set, which has 1800 observations (i.e., firm across year) with four variables, year,firm id, _b_x, and _b_cons
save this data set. 9*200,数据包里会有1800行数据,代表每个模型的constant.
done!