___ ____ ____ ____ ____ ©
/__ / ____/ / ____/ 17.0
___/ / /___/ / /___/ MP—Parallel Edition
Statistics and Data Science Copyright 1985-2021 StataCorp LLC
StataCorp
4905 Lakeway Drive
College Station, Texas 77845 USA
800-STATA-PC https://www.stata.com
979-696-4600 stata@stata.com
Stata license: Unlimited-user 64-core network perpetual
Serial number: 18461036
Licensed to: TEAM BTCR
TEAM BTCR
Notes:
1. Unicode is supported; see help unicode_advice.
2. More than 2 billion observations are allowed; see help obs_advice.
3. Maximum number of variables is set to 5,000; see help set_maxvar.
. doedit "C:\Users\21565\Desktop\0727.do"
. do "C:\Users\21565\AppData\Local\Temp\STD4af0_000000.tmp"
. cd "$D"
C:\Users\21565\Desktop
. cd C:\Users\21565\Desktop\shuiwuyanjiu
C:\Users\21565\Desktop\shuiwuyanjiu
. set scheme s2color
. sysdir set PLUS D:\Stata15\ado\plus
.
. import excel "model0722(2).xlsx", sheet(Sheet1) /// 30,16yrs
> firstrow clear
(23 vars, 744 obs)
. xtset id year
Panel variable: id (strongly balanced)
Time variable: year, 2000 to 2023
Delta: 1 unit
.
. * ================================================
. * 基准回归
. * ================================================
. xtreg invapply ai, fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.7726 min = 24
Between = 0.7957 avg = 24.0
Overall = 0.7042 max = 24
F(1,712) = 2418.99
corr(u_i, Xb) = 0.3195 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .564122 .0114698 49.18 0.000 .5416034 .5866407
_cons | 4.297181 .0436825 98.37 0.000 4.211419 4.382943
-------------+----------------------------------------------------------------
sigma_u | .9971544
sigma_e | .74612058
rho | .64107588 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 712) = 38.49 Prob > F = 0.0000
. est store m1
.
. xtreg invapply ai agdp, fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.9265 min = 24
Between = 0.4880 avg = 24.0
Overall = 0.6896 max = 24
F(2,711) = 4480.87
corr(u_i, Xb) = 0.1248 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .120701 .0132162 9.13 0.000 .0947536 .1466483
agdp | 1.552592 .0402407 38.58 0.000 1.473587 1.631597
_cons | -10.32153 .3797077 -27.18 0.000 -11.06702 -9.576051
-------------+----------------------------------------------------------------
sigma_u | 1.1651541
sigma_e | .42449749
rho | .88281948 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 711) = 146.66 Prob > F = 0.0000
. est store m2
.
. xtreg invapply ai agdp str, fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.9265 min = 24
Between = 0.4805 avg = 24.0
Overall = 0.6868 max = 24
F(3,710) = 2983.56
corr(u_i, Xb) = 0.1205 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .1173344 .016548 7.09 0.000 .0848455 .1498233
agdp | 1.556666 .0420266 37.04 0.000 1.474155 1.639178
str | .033238 .0982107 0.34 0.735 -.1595802 .2260562
_cons | -10.35741 .3944589 -26.26 0.000 -11.13186 -9.582969
-------------+----------------------------------------------------------------
sigma_u | 1.1704721
sigma_e | .42476207
rho | .8836303 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 710) = 125.85 Prob > F = 0.0000
. est store m3
.
. xtreg invapply ai agdp str for, fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.9267 min = 24
Between = 0.4779 avg = 24.0
Overall = 0.6839 max = 24
F(4,709) = 2240.22
corr(u_i, Xb) = 0.1235 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .116514 .0165523 7.04 0.000 .0840167 .1490114
agdp | 1.562672 .0422621 36.98 0.000 1.479698 1.645645
str | .0654837 .1012761 0.65 0.518 -.1333533 .2643206
for | -.0401979 .0310571 -1.29 0.196 -.1011728 .0207771
_cons | -10.35845 .3942722 -26.27 0.000 -11.13253 -9.584364
-------------+----------------------------------------------------------------
sigma_u | 1.177172
sigma_e | .42456022
rho | .88489586 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 709) = 123.11 Prob > F = 0.0000
. est store m4
.
. xtreg invapply ai agdp str for edu, fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.9267 min = 24
Between = 0.4897 avg = 24.0
Overall = 0.6885 max = 24
F(5,708) = 1789.69
corr(u_i, Xb) = 0.1294 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .1171744 .0175155 6.69 0.000 .0827859 .1515629
agdp | 1.554269 .0839054 18.52 0.000 1.389535 1.719002
str | .0663194 .1016026 0.65 0.514 -.133159 .2657978
for | -.0404084 .0311317 -1.30 0.195 -.10153 .0207132
edu | .010375 .0894747 0.12 0.908 -.1652925 .1860425
_cons | -10.31408 .5495692 -18.77 0.000 -11.39306 -9.235104
-------------+----------------------------------------------------------------
sigma_u | 1.1683881
sigma_e | .42485591
rho | .88321774 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 708) = 40.53 Prob > F = 0.0000
. est store m5
.
. xtreg invapply ai agdp str for edu env, fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.9268 min = 24
Between = 0.5083 avg = 24.0
Overall = 0.6971 max = 24
F(6,707) = 1492.99
corr(u_i, Xb) = 0.1365 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .1229116 .0180765 6.80 0.000 .0874215 .1584017
agdp | 1.562927 .0841427 18.57 0.000 1.397728 1.728127
str | .0455296 .1028578 0.44 0.658 -.1564137 .247473
for | -.0312571 .0319347 -0.98 0.328 -.0939553 .0314411
edu | .0191087 .089697 0.21 0.831 -.1569956 .1952131
env | .032143 .025205 1.28 0.203 -.0173426 .0816286
_cons | -10.56798 .584291 -18.09 0.000 -11.71513 -9.420823
-------------+----------------------------------------------------------------
sigma_u | 1.1513811
sigma_e | .42466812
rho | .88025203 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 707) = 38.82 Prob > F = 0.0000
. est store m6
.
. xtreg invapply ai str for edu env , fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.8912 min = 24
Between = 0.7994 avg = 24.0
Overall = 0.8362 max = 24
F(5,708) = 1159.29
corr(u_i, Xb) = -0.3131 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .3364388 .0170052 19.78 0.000 .3030522 .3698254
str | -.1012334 .1250108 -0.81 0.418 -.3466696 .1442029
for | -.0392087 .0389241 -1.01 0.314 -.1156293 .0372118
edu | 1.43894 .0572094 25.15 0.000 1.32662 1.551261
env | -.0056361 .0306241 -0.18 0.854 -.065761 .0544887
_cons | -.5039375 .2666023 -1.89 0.059 -1.027363 .0194881
-------------+----------------------------------------------------------------
sigma_u | .77063643
sigma_e | .51766061
rho | .689074 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 708) = 28.38 Prob > F = 0.0000
. est store m7
. esttab m1 m2 m3 m4 m5 m6 m7 using d:/reg1.rtf, replace b(%6.3f) t(%6.2f) t r2 star(* 0.1 ** 0.05
> *** 0.01) compress nogap mtitles("m1" "m2" "m3" "m4""m5""m6""m7") title("表1")
(output written to d:/reg1.rtf)
. *-------------------------------------------------- // 分位数回归
. xtqreg invapply ai agdp str for edu env tra, quantile(.1(0.2)0.9) //递增
command xtqreg is unrecognized
r(199);
end of do-file
r(199);
. ssc install xtqreg
checking xtqreg consistency and verifying not already installed...
cannot write in directory D:\Stata15\ado\plus\x
r(603);
. mkdir "D:\StataAdo\plus"
could not create directory D:\StataAdo\plus
r(693);
.
. mkdir "D:\StataAdo\personal"
could not create directory D:\StataAdo\personal
r(693);
. sysdir set PLUS "D:\StataAdo\plus"
.
. sysdir set PERSONAL "D:\StataAdo\personal"
. * 卸载旧安装尝试(如有)
.
. cap ado uninstall xtqreg
.
.
.
. * 通过ssc安装
.
. ssc install xtqreg, replace
checking xtqreg consistency and verifying not already installed...
installing into D:\StataAdo\plus\...
installation complete.
. do "C:\Users\21565\AppData\Local\Temp\STD4af0_000000.tmp"
. cd "$D"
C:\Users\21565\Desktop\shuiwuyanjiu
. cd C:\Users\21565\Desktop\shuiwuyanjiu
C:\Users\21565\Desktop\shuiwuyanjiu
. set scheme s2color
. sysdir set PLUS D:\Stata15\ado\plus
.
. import excel "model0722(2).xlsx", sheet(Sheet1) /// 30,16yrs
> firstrow clear
(23 vars, 744 obs)
. xtset id year
Panel variable: id (strongly balanced)
Time variable: year, 2000 to 2023
Delta: 1 unit
.
. * ================================================
. * 基准回归
. * ================================================
. xtreg invapply ai, fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.7726 min = 24
Between = 0.7957 avg = 24.0
Overall = 0.7042 max = 24
F(1,712) = 2418.99
corr(u_i, Xb) = 0.3195 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .564122 .0114698 49.18 0.000 .5416034 .5866407
_cons | 4.297181 .0436825 98.37 0.000 4.211419 4.382943
-------------+----------------------------------------------------------------
sigma_u | .9971544
sigma_e | .74612058
rho | .64107588 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 712) = 38.49 Prob > F = 0.0000
. est store m1
.
. xtreg invapply ai agdp, fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.9265 min = 24
Between = 0.4880 avg = 24.0
Overall = 0.6896 max = 24
F(2,711) = 4480.87
corr(u_i, Xb) = 0.1248 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .120701 .0132162 9.13 0.000 .0947536 .1466483
agdp | 1.552592 .0402407 38.58 0.000 1.473587 1.631597
_cons | -10.32153 .3797077 -27.18 0.000 -11.06702 -9.576051
-------------+----------------------------------------------------------------
sigma_u | 1.1651541
sigma_e | .42449749
rho | .88281948 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 711) = 146.66 Prob > F = 0.0000
. est store m2
.
. xtreg invapply ai agdp str, fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.9265 min = 24
Between = 0.4805 avg = 24.0
Overall = 0.6868 max = 24
F(3,710) = 2983.56
corr(u_i, Xb) = 0.1205 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .1173344 .016548 7.09 0.000 .0848455 .1498233
agdp | 1.556666 .0420266 37.04 0.000 1.474155 1.639178
str | .033238 .0982107 0.34 0.735 -.1595802 .2260562
_cons | -10.35741 .3944589 -26.26 0.000 -11.13186 -9.582969
-------------+----------------------------------------------------------------
sigma_u | 1.1704721
sigma_e | .42476207
rho | .8836303 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 710) = 125.85 Prob > F = 0.0000
. est store m3
.
. xtreg invapply ai agdp str for, fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.9267 min = 24
Between = 0.4779 avg = 24.0
Overall = 0.6839 max = 24
F(4,709) = 2240.22
corr(u_i, Xb) = 0.1235 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .116514 .0165523 7.04 0.000 .0840167 .1490114
agdp | 1.562672 .0422621 36.98 0.000 1.479698 1.645645
str | .0654837 .1012761 0.65 0.518 -.1333533 .2643206
for | -.0401979 .0310571 -1.29 0.196 -.1011728 .0207771
_cons | -10.35845 .3942722 -26.27 0.000 -11.13253 -9.584364
-------------+----------------------------------------------------------------
sigma_u | 1.177172
sigma_e | .42456022
rho | .88489586 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 709) = 123.11 Prob > F = 0.0000
. est store m4
.
. xtreg invapply ai agdp str for edu, fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.9267 min = 24
Between = 0.4897 avg = 24.0
Overall = 0.6885 max = 24
F(5,708) = 1789.69
corr(u_i, Xb) = 0.1294 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .1171744 .0175155 6.69 0.000 .0827859 .1515629
agdp | 1.554269 .0839054 18.52 0.000 1.389535 1.719002
str | .0663194 .1016026 0.65 0.514 -.133159 .2657978
for | -.0404084 .0311317 -1.30 0.195 -.10153 .0207132
edu | .010375 .0894747 0.12 0.908 -.1652925 .1860425
_cons | -10.31408 .5495692 -18.77 0.000 -11.39306 -9.235104
-------------+----------------------------------------------------------------
sigma_u | 1.1683881
sigma_e | .42485591
rho | .88321774 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 708) = 40.53 Prob > F = 0.0000
. est store m5
.
. xtreg invapply ai agdp str for edu env, fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.9268 min = 24
Between = 0.5083 avg = 24.0
Overall = 0.6971 max = 24
F(6,707) = 1492.99
corr(u_i, Xb) = 0.1365 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .1229116 .0180765 6.80 0.000 .0874215 .1584017
agdp | 1.562927 .0841427 18.57 0.000 1.397728 1.728127
str | .0455296 .1028578 0.44 0.658 -.1564137 .247473
for | -.0312571 .0319347 -0.98 0.328 -.0939553 .0314411
edu | .0191087 .089697 0.21 0.831 -.1569956 .1952131
env | .032143 .025205 1.28 0.203 -.0173426 .0816286
_cons | -10.56798 .584291 -18.09 0.000 -11.71513 -9.420823
-------------+----------------------------------------------------------------
sigma_u | 1.1513811
sigma_e | .42466812
rho | .88025203 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 707) = 38.82 Prob > F = 0.0000
. est store m6
.
. xtreg invapply ai str for edu env , fe //gd
Fixed-effects (within) regression Number of obs = 744
Group variable: id Number of groups = 31
R-squared: Obs per group:
Within = 0.8912 min = 24
Between = 0.7994 avg = 24.0
Overall = 0.8362 max = 24
F(5,708) = 1159.29
corr(u_i, Xb) = -0.3131 Prob > F = 0.0000
------------------------------------------------------------------------------
invapply | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ai | .3364388 .0170052 19.78 0.000 .3030522 .3698254
str | -.1012334 .1250108 -0.81 0.418 -.3466696 .1442029
for | -.0392087 .0389241 -1.01 0.314 -.1156293 .0372118
edu | 1.43894 .0572094 25.15 0.000 1.32662 1.551261
env | -.0056361 .0306241 -0.18 0.854 -.065761 .0544887
_cons | -.5039375 .2666023 -1.89 0.059 -1.027363 .0194881
-------------+----------------------------------------------------------------
sigma_u | .77063643
sigma_e | .51766061
rho | .689074 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(30, 708) = 28.38 Prob > F = 0.0000
. est store m7
. esttab m1 m2 m3 m4 m5 m6 m7 using d:/reg1.rtf, replace b(%6.3f) t(%6.2f) t r2 star(* 0.1 ** 0.05
> *** 0.01) compress nogap mtitles("m1" "m2" "m3" "m4""m5""m6""m7") title("表1")
(output written to d:/reg1.rtf)
. *-------------------------------------------------- // 分位数回归
. xtqreg invapply ai agdp str for edu env tra, quantile(.1(0.2)0.9) //递增
command xtqreg is unrecognized
r(199);
end of do-file
r(199);
. help xtqreg // 应显示帮助文档
.
. xtset id year // 设置面板数据
/ invalid name
r(198);
.
. xtqreg invapply ai, quantile(0.5) // 试运行
command xtqreg is unrecognized
r(199);
. xtqreg invapply ai, quantile(0.5)
command xtqreg is unrecognized
r(199);
.
最新发布