久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

Stata:支持加入多維固定效應(yīng)的中介效應(yīng)命令-medhdfe

 我是張金康呀 2023-12-25 發(fā)布于江蘇

1 medhdfe簡介

運(yùn)用Stata進(jìn)行中介效應(yīng)分析時(shí),,你是否曾經(jīng)為如何加入時(shí)間固定效應(yīng)和個(gè)體固定效應(yīng)而煩惱呢,?

全新編寫的Stata命令medhdfe重磅首發(fā),,支持在進(jìn)行中介效應(yīng)分析時(shí)控制多維固定效應(yīng),,讓你和煩惱說拜拜,。

2 medhdfe特點(diǎn)

  • medhdfe將中介效應(yīng)命令sgmediation2與多維固定效應(yīng)命令reghdfe相結(jié)合,完美解決在中介效應(yīng)分析時(shí)如何加入多維固定效應(yīng)的問題,。

  • 相比在sgmediation2命令中的控制變量部分引入多個(gè)維度虛擬變量,,medhdfe通過absorb加入多維固定效應(yīng),極大提高了運(yùn)行速度,。

  • medhdfe還支持加入穩(wěn)健標(biāo)準(zhǔn)誤,,包括異方差穩(wěn)健標(biāo)準(zhǔn)誤robust和聚類穩(wěn)健標(biāo)準(zhǔn)誤cluster

3 medhdfe語法

medhdfe depvar [if exp] [in range] , iv(indepvar) mv(medvar) cv(ctrlvar) absorb(absvars) [options]

其中,,depvar為因變量,,indepvar為自變量,medvar為中介變量,,ctrlvar為控制變量,,absvars為固定維度。

4 medhdfe示例

grunfeld.dta數(shù)據(jù)集為例,,對medhdfe命令的運(yùn)用進(jìn)行演示,。

示例以invest為因變量,mvalue為自變量,,kstock為中介變量,,同時(shí)控制company公司固定效應(yīng)和year年份固定效應(yīng)。

webuse 'grunfeld', clear
medhdfe invest, iv(mvalue) mv(kstock) absorb(company year)

具體結(jié)果如下:

Model with dv regressed on iv (path c)
reghdfe invest mvalue , absorb(company year) cluster() vce()
(MWFE estimator converged in 2 iterations)

HDFE Linear regression Number of obs = 200
Absorbing 2 HDFE groups F( 1, 170) = 76.08
Prob > F = 0.0000
R-squared = 0.8808
Adj R-squared = 0.8604
Within R-sq. = 0.3092
Root MSE = 81.0287

------------------------------------------------------------------------------
invest | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
mvalue | .1799679 .0206334 8.72 0.000 .1392372 .2206986
_cons | -48.70963 23.0425 -2.11 0.036 -94.19591 -3.223356
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
Absorbed FE | Categories - Redundant = Num. Coefs |
-------------+---------------------------------------|
company | 10 0 10 |
year | 20 1 19 |
-----------------------------------------------------+

Model with mediator regressed on iv (path a)
reghdfe kstock mvalue , absorb(company year) cluster() vce()
(MWFE estimator converged in 2 iterations)

HDFE Linear regression Number of obs = 200
Absorbing 2 HDFE groups F( 1, 170) = 15.30
Prob > F = 0.0001
R-squared = 0.7127
Adj R-squared = 0.6637
Within R-sq. = 0.0826
Root MSE = 174.6154

------------------------------------------------------------------------------
kstock | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
mvalue | .1739291 .0444647 3.91 0.000 .0861551 .2617031
_cons | 87.88131 49.65618 1.77 0.079 -10.14081 185.9034
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
Absorbed FE | Categories - Redundant = Num. Coefs |
-------------+---------------------------------------|
company | 10 0 10 |
year | 20 1 19 |
-----------------------------------------------------+

Model with dv regressed on mediator and iv (paths b and c')
reghdfe invest kstock mvalue , absorb(company year) cluster() vce()
(MWFE estimator converged in 2 iterations)

HDFE Linear regression Number of obs = 200
Absorbing 2 HDFE groups F( 2, 169) = 217.44
Prob > F = 0.0000
R-squared = 0.9517
Adj R-squared = 0.9431
Within R-sq. = 0.7201
Root MSE = 51.7245

------------------------------------------------------------------------------
invest | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
kstock | .3579163 .022719 15.75 0.000 .3130667 .4027659
mvalue | .1177158 .0137513 8.56 0.000 .0905694 .1448623
_cons | -80.16378 14.84402 -5.40 0.000 -109.4674 -50.86019
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
Absorbed FE | Categories - Redundant = Num. Coefs |
-------------+---------------------------------------|
company | 10 0 10 |
year | 20 1 19 |
-----------------------------------------------------+

Sobel-Goodman Mediation Tests

| Est Std_err z P>|z|
---------------------+------------------------------------------------
Sobel | 0.062 0.016 3.796 0.000
Aroian | 0.062 0.016 3.789 0.000
Goodman | 0.062 0.016 3.804 0.000

Indirect, Direct, and Total Effects

| Est Std_err z P>|z|
---------------------+------------------------------------------------
a_coefficient | 0.174 0.044 3.912 0.000
b_coefficient | 0.358 0.023 15.754 0.000
Indirect_effect_aXb | 0.062 0.016 3.796 0.000
Direct_effect_c' | 0.118 0.014 8.560 0.000
Total_effect_c | 0.180 0.021 8.722 0.000


Proportion of total effect that is mediated: 0.346
Ratio of indirect to direct effect: 0.529
Ratio of total to direct effect: 1.529

5 medhdfe獲取

    本站是提供個(gè)人知識管理的網(wǎng)絡(luò)存儲空間,,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn),。請注意甄別內(nèi)容中的聯(lián)系方式,、誘導(dǎo)購買等信息,謹(jǐn)防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào),。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多