这是不加robust 和 cluster的结果
reg lnggdp did lnpgdp lnfdl lnop lnis lntc lnpop i.year i.province . reg lnggdp did lnpgdp lnfdl lnop lnis lntc lnpop i.year i.province
Source | SS df MS Number of obs = 330
-------------+---------------------------------- F(46, 283) = 159.41
Model | 206.478606 46 4.48866534 Prob > F = 0.0000
Residual | 7.96851467 283 .028157296 R-squared = 0.9628
-------------+---------------------------------- Adj R-squared = 0.9568
Total | 214.44712 329 .651814955 Root MSE = .1678
------------------------------------------------------------------------------
lnggdp | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
did | .3125367 .0501788 6.23 0.000 .2137656 .4113077
lnpgdp | .378234 .119347 3.17 0.002 .1433135 .6131544
lnfdl | .0730837 .0226938 3.22 0.001 .0284137 .1177537
lnop | .0561743 .0457679 1.23 0.221 -.0339145 .146263
lnis | -.1843417 .213466 -0.86 0.389 -.6045243 .2358408
lntc | .0507554 .0411313 1.23 0.218 -.0302068 .1317175
lnpop | 1.757959 .3548498 4.95 0.000 1.059479 2.456439
xtreg lnggdp did lnpgdp lnfdl lnop lnis lntc lnpop i.year , fe
. xtreg lnggdp did lnpgdp lnfdl lnop lnis lntc lnpop i.year , fe
Fixed-effects (within) regression Number of obs = 330
Group variable: province Number of groups = 30
R-squared: Obs per group:
Within = 0.8045 min = 11
Between = 0.0183 avg = 11.0
Overall = 0.0463 max = 11
F(17, 283) = 68.51
corr(u_i, Xb) = -0.8176 Prob > F = 0.0000
------------------------------------------------------------------------------
lnggdp | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
did | .3125367 .0501788 6.23 0.000 .2137656 .4113077
lnpgdp | .378234 .119347 3.17 0.002 .1433135 .6131544
lnfdl | .0730837 .0226938 3.22 0.001 .0284137 .1177537
lnop | .0561743 .0457679 1.23 0.221 -.0339145 .146263
lnis | -.1843417 .213466 -0.86 0.389 -.6045243 .2358408
lntc | .0507554 .0411313 1.23 0.218 -.0302068 .1317175
lnpop | 1.757959 .3548498 4.95 0.000 1.059479 2.456439
可以看出不加robust和cluster,控制个体和时间,reg和xtreg系数一样,标准误也一样
下面是加入robust和cluster id
reg lnggdp did lnpgdp lnfdl lnop lnis lntc lnpop i.year i.province,vce(cluster province)
. reg lnggdp did lnpgdp lnfdl lnop lnis lntc lnpop i.year i.province,vce(cluster province)
Linear regression Number of obs = 330
F(16, 29) = .
Prob > F = .
R-squared = 0.9628
Root MSE = .1678
(Std. err. adjusted for 30 clusters in province)
------------------------------------------------------------------------------
| Robust
lnggdp | Coefficient std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
did | .3125367 .0875221 3.57 0.001 .1335339 .4915394
lnpgdp | .378234 .111944 3.38 0.002 .1492827 .6071852
lnfdl | .0730837 .0446092 1.64 0.112 -.0181524 .1643198
lnop | .0561743 .0642492 0.87 0.389 -.0752302 .1875787
lnis | -.1843417 .3037372 -0.61 0.549 -.805554 .4368706
lntc | .0507554 .0784388 0.65 0.523 -.10967 .2111807
lnpop | 1.757959 .7755459 2.27 0.031 .17179 3.344129
xtreg lnggdp did lnpgdp lnfdl lnop lnis lntc lnpop i.year , fe robust
. xtreg lnggdp did lnpgdp lnfdl lnop lnis lntc lnpop i.year , fe robust
Fixed-effects (within) regression Number of obs = 330
Group variable: province Number of groups = 30
R-squared: Obs per group:
Within = 0.8045 min = 11
Between = 0.0183 avg = 11.0
Overall = 0.0463 max = 11
F(17, 29) = 86.73
corr(u_i, Xb) = -0.8176 Prob > F = 0.0000
(Std. err. adjusted for 30 clusters in province)
------------------------------------------------------------------------------
| Robust
lnggdp | Coefficient std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
did | .3125367 .0833553 3.75 0.001 .1420558 .4830175
lnpgdp | .378234 .1066146 3.55 0.001 .1601825 .5962854
lnfdl | .0730837 .0424855 1.72 0.096 -.0138089 .1599763
lnop | .0561743 .0611905 0.92 0.366 -.0689744 .1813229
lnis | -.1843417 .289277 -0.64 0.529 -.7759796 .4072961
lntc | .0507554 .0747045 0.68 0.502 -.1020326 .2035433
lnpop | 1.757959 .738624 2.38 0.024 .2473037 3.268615
可以看到系数是相同的但是标准误却不一样了,但是我知道xtreg 的robust是cluster 到province层次的,我也手动调整了reg 喂cluster province,为什么还是标准误不一样???不应该两者等价了吗?