总觉得areg这个命定不能做面板数据回归,因为它好像体现不出时间t???!!!
可是看到大牛也用这个命定做面板数据回归,哪位对areg比较熟悉的可以介绍一下吗?为什么它也可以做面板回归????
以下内容来自普林斯顿大学网页:
http://www.princeton.edu/wwac/academic-review/stata/commands/areg/
Commands
areg
This command implements fixed effects regressions on panel data. To implement the model
yit = a + b xit + ci
use the command: areg y x, absorb(i)
Example
. areg crmrte unem, absorb(city)
Number of obs = 92
F( 1, 45) = 0.00
Prob > F = 0.9764
R-squared = 0.8643
Adj R-squared = 0.7255
Root MSE = 15.636
------------------------------------------------------------------------------
crmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unem | -.0180942 .6086846 -0.03 0.976 -1.244048 1.207859
_cons | 100.935 5.118785 19.72 0.000 90.62526 111.2448
-------------+----------------------------------------------------------------
city | F(45, 45) = 6.358 0.000 (46 categories)
Thus we estimate crmrteit= 100.94 - 0.018 unemit + ci. Note that the values of the cis are not reported.
Options
This command can only be used on data in the long format -- where there is a row of data for every pair of values i and t.
The option , r makes Stata calculate robust standard errors (ie, Stata does not assume homoskedasticity).
Other independent variables (that vary for one individual/city) may be added:
areg crmrte unem pop pcinc, absorb(city)
Dummy variables for all but one time period may also be added to estimate the regression model:
yit = a + b xit + ci + dt
areg crmrte unem d87, absorb(city)
In this case, Stata will calculate and display the values of the dts. This data set only has two years of data, so only one dummy is added. If we had data for every year 87-90, it would look like
areg crmrte unem d87 d88 d89, absorb(city)
Notes
Using areg y x, absorb(id) is equivalent to making dummy variables for each value of id and adding them to the regression. Thus the regression areg crmrte unem, absorb(city) r is equivalent to
. capture tab city, gen(city_)
. reg crmrte unem city_*, r
Regression with robust standard errors Number of obs = 92
F( 46, 45) = 131.56
Prob > F = 0.0000
R-squared = 0.8643
Root MSE = 15.636
------------------------------------------------------------------------------
| Robust
crmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unem | -.0180942 .4419652 -0.04 0.968 -.9082577 .8720694
city_1 | -59.66365 5.304407 -11.25 0.000 -70.34727 -48.98002
city_2 | 38.62867 4.772003 8.09 0.000 29.01736 48.23997
...
city_45 | -36.79864 3.956315 -9.30 0.000 -44.76707 -28.83021
city_46 | -19.85049 19.24488 -1.03 0.308 -58.61167 18.91069
_cons | 128.3743 6.501985 19.74 0.000 115.2786 141.47
------------------------------------------------------------------------------
The only difference is that with areg Stata does not display the estimates of all the ci.
See notes on fixed effects models for different ways to implement fixed effects in Stata. areg is almost always the easiest.


雷达卡





京公网安备 11010802022788号







