我的自变量为yl,因变量x,调节变量m。首先,对x和m进行中心化处理,对中心化处理后的x进行平方,分别得到x1、c_m和x1a,形成中心化后的x*m和x²*m交互项,得到xx1和xx1a;然后,用reghdfe命令对不加入调节效应和加入调节效应的情况进行回归,固定个体与时间,得到以下结果:
加入调节效应前:
. reghdfe yl x1 x1a c2 c3 cl6 c7 p4,ab(id year)vce(cluster id)
HDFE Linear regression Number of obs = 5,213
Absorbing 2 HDFE groups F( 7, 2054) = 7.28
Statistics robust to heteroskedasticity Prob > F = 0.0000
R-squared = 0.6278
Adj R-squared = 0.3837
Within R-sq. = 0.0180
Number of clusters (id) = 2,055 Root MSE = 2.5024
(Std. err. adjusted for 2,055 clusters in id)
------------------------------------------------------------------------------
| Robust
yl | Coefficient std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
x1 | -5.868152 2.910417 -2.02 0.044 -11.57583 -.1604758
x1a | 7.109896 3.70527 1.92 0.055 -.1565814 14.37637
c2 | .1428112 .0661571 2.16 0.031 .0130693 .2725532
c3 | .5219376 .1792063 2.91 0.004 .1704925 .8733827
cl6 | .2445857 .0723449 3.38 0.001 .1027086 .3864628
c7 | .9995684 .2387919 4.19 0.000 .5312689 1.467868
p4 | .1092356 .0531125 2.06 0.040 .0050756 .2133956
_cons | 3.37907 .9348535 3.61 0.000 1.545711 5.21243
------------------------------------------------------------------------------
加入调节效应后:
.reghdfe yl x1 x1a c_m xx1 xx1a c2 c3 cl6 c7 p4,ab(id year)vce(cluster id)
HDFE Linear regression Number of obs = 5,213
Absorbing 2 HDFE groups F( 10, 2054) = 9.16
Statistics robust to heteroskedasticity Prob > F = 0.0000
R-squared = 0.6316
Adj R-squared = 0.3895
Within R-sq. = 0.0282
Number of clusters (id) = 2,055 Root MSE = 2.4906
(Std. err. adjusted for 2,055 clusters in id)
------------------------------------------------------------------------------
| Robust
yl | Coefficient std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
x1 | -6.534242 2.817982 -2.32 0.021 -12.06064 -1.007843
x1a | 8.308529 3.547484 2.34 0.019 1.351488 15.26557
c_m | .197551 .0531225 3.72 0.000 .0933713 .3017306
xx1 | -1.340093 .4932163 -2.72 0.007 -2.307349 -.372837
xx1a | 3.2831 1.403168 2.34 0.019 .5313209 6.03488
c2 | .1375517 .0657643 2.09 0.037 .0085801 .2665233
c3 | .4498818 .1781744 2.52 0.012 .1004605 .7993031
cl6 | .237924 .073435 3.24 0.001 .0939092 .3819387
c7 | .9638046 .2374242 4.06 0.000 .4981874 1.429422
p4 | .1055132 .0527522 2.00 0.046 .0020599 .2089665
_cons | 3.583747 .9423266 3.80 0.000 1.735732 5.431762
------------------------------------------------------------------------------
之后,用utest指令检验u型关系是否存在
.utest x1 x1a
Specification: f(x)=x^2
Extreme point: .393225
Test:
H1: U shape
vs. H0: Monotone or Inverse U shape
-------------------------------------------------
| Lower bound Upper bound
-----------------+-------------------------------
Interval | .0602599 .9906224
Slope | -5.5329 9.926988
t-value | -2.266414 2.127871
P>|t| | .0117648 .0167333
-------------------------------------------------
Overall test of presence of a U shape:
t-value = 2.13
P>|t| = .0167
因为p<0.05,所以可以在5%的统计水平下拒绝原假设,u型关系存在
请问我的操作是否正确呢?如果存在问题,请帮忙指正,如果正确,应该如何解读调节效应的作用呢?我只能看出是正u型。非常感谢!


雷达卡



京公网安备 11010802022788号







