黃河泉 发表于 2018-12-21 18:25 
请将所有指令与结果发出来!
. xtreg lnfdi L1rrgdp L1rulc L1rer L1trade L1rir L1rrd rpop, fe
Fixed-effects (within) regression Number of obs = 105
Group variable: country Number of groups = 11
R-sq: within = 0.3131 Obs per group: min = 7
between = 0.6102 avg = 9.5
overall = 0.5836 max = 10
F(7,87) = 5.66
corr(u_i, Xb) = -0.9785 Prob > F = 0.0000
------------------------------------------------------------------------------
lnfdi | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
L1rrgdp | .0141096 .0223945 0.63 0.530 -.0304019 .0586212
L1rulc | .0874463 .2446342 0.36 0.722 -.3987907 .5736833
L1rer | -.0014272 .0026084 -0.55 0.586 -.0066117 .0037574
L1trade | 10.5698 5.179762 2.04 0.044 .2744673 20.86514
L1rir | -.0119678 .0103623 -1.15 0.251 -.032564 .0086283
L1rrd | 1.025744 .4448068 2.31 0.023 .1416419 1.909845
rpop | -.7772726 .3111296 -2.50 0.014 -1.395676 -.1588689
_cons | 12.24517 1.771002 6.91 0.000 8.725109 15.76522
-------------+----------------------------------------------------------------
sigma_u | 5.2056734
sigma_e | .28441848
rho | .99702376 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(10, 87) = 72.77 Prob > F = 0.0000
.
est store fe
. xtreg lnfdi L1rrgdp L1rulc L1rer L1trade L1rir L1rrd rpop,re
Random-effects GLS regression Number of obs = 105
Group variable: country Number of groups = 11
R-sq: within = 0.2493 Obs per group: min = 7
between = 0.7421 avg = 9.5
overall = 0.7191 max = 10
Wald chi2(7) = 101.00
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
------------------------------------------------------------------------------
lnfdi | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
L1rrgdp | .0058798 .0260229 0.23 0.821 -.0451241 .0568838
L1rulc | .2115928 .255625 0.83 0.408 -.289423 .7126087
L1rer | -.000431 .0022969 -0.19 0.851 -.0049329 .0040709
L1trade | 16.18094 3.701963 4.37 0.000 8.925224 23.43665
L1rir | -.0071806 .011183 -0.64 0.521 -.0290989 .0147377
L1rrd | .7173122 .3407237 2.11 0.035 .049506 1.385118
rpop | -.1389592 .0238177 -5.83 0.000 -.1856411 -.0922773
_cons | 9.182317 .4611844 19.91 0.000 8.278412 10.08622
-------------+----------------------------------------------------------------
sigma_u | .44332458
sigma_e | .28441848
rho | .70841759 (fraction of variance due to u_i)
------------------------------------------------------------------------------
. est store re
. hausman fe re
Note: the rank of the differenced variance matrix (6) does not equal the number of coefficients being tested (7); be
sure this is what you expect, or there may be problems computing the test. Examine the output of your
estimators for anything unexpected and possibly consider scaling your variables so that the coefficients are
on a similar scale.
---- Coefficients ----
| (b) (B) (b-B) sqrt(diag(V_b-V_B))
| fe re Difference S.E.
-------------+----------------------------------------------------------------
L1rrgdp | .0141096 .0058798 .0082298 .
L1rulc | .0874463 .2115928 -.1241466 .
L1rer | -.0014272 -.000431 -.0009962 .0012361
L1trade | 10.5698 16.18094 -5.611133 3.6229
L1rir | -.0119678 -.0071806 -.0047872 .
L1rrd | 1.025744 .7173122 .3084314 .2859379
rpop | -.7772726 -.1389592 -.6383134 .3102166
------------------------------------------------------------------------------
b = consistent under Ho and Ha; obtained from xtreg
B = inconsistent under Ha, efficient under Ho; obtained from xtreg
Test: Ho: difference in coefficients not systematic
chi2(6) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 14.11
Prob>chi2 = 0.0284
(V_b-V_B is not positive definite)