查看原文
其他

一文读懂中介效应之sgmediation操作

数量经济学 数量经济学 2023-02-21


1
Sobel-Goodman mediation tests

Description:
The purpose of the Sobel-Goodman tests are to test whether a mediator carries the influence of an IV to a DV. A variable may be considered a mediator to the extent to which it carries the influence of a given independent variable (IV) to a given dependent variable (DV). Generally speaking, mediation can be said to occur when (1) the IV significantly affects the mediator, (2) the IV significantly affects the DV in the absence of the mediator, (3) the mediator has a significant unique effect on the DV, and (4) the effect of the IV on the DV shrinks upon the addition of the mediator to the model.

语法格式为:
sgmediation 因变量, mv(中介变量) iv(自变量) cv(控制变量 )
 sgmediation depvar [if exp] [in range] , mv:(mediatorvar) iv(indvar) [ cv(covarlist) quietly ]
选项含义为:

cv(covarlist) Optional list of covariate variables.

quietly Suppresses the individual regression output.


2
操作案例
本例使用hsbdemo数据集,其中science作为DV, math作为IV, read作为中介变量。也就是说,模型说数学影响阅读,而阅读反过来又影响科学。这个模型可能有也可能没有太大的实际意义,但是它将允许我们演示运行一个中介效应测试的过程。我们将使用sgmediation command来完成这个任务,您可以使用findit sgmediation来下载这个命令。

该数据包括200个学生的选择的项目类型(prog, 三种类型 categorical variable), 他们的社会地位(ses 三种地位 categorical variable),写作分数(write, a continuous variable)。
导入数据,然后进行查看数据
 edit desc
数据如下:


进行操作为:
 sgmediation science, mv(read) iv(math)
结果为:

In this example the mediation effect of read was statistically significant with approximately 40% of the total effect (of math onscience) being mediated.

在这个例子中,read的中介效果在统计上是显著的,大约40%的总效果(数学对科学)是被中介的。


3
操作案例

 sgmediation science, mv(read) iv(math) cv(write)


4
操作案例


 bootstrap with case resampling
bootstrap r(ind_eff) r(dir_eff), reps(1000): sgmediation science, mv(read) iv(math)estat bootstrap, percentile bc


If you prefer to do a residual resampling bootstrap rather than case resampling bootstrap, you can use the resboot-mediationcommand (findit resboot_mediation).


bootstrap with residual resampling need to install resboot_mediation

findit resboot_mediatonresboot_mediation, dv(science) mv(read) iv(math) reps(1000)


5
References

Aroian, L.A. (1944). The probability function of the product of two normally distributed variables. Annals of Mathematical Statistics, 18, 265-271.
Baron, R.M. & Kenny, D.A. (1986), Moderator-Mediator Variables Distinction in Social Psychological Research: Conceptual, Strategic, and Statistical Considerations. Journal of Personality and Social Psychology, 51 (6), 1173–82.
Goodman, L.A. (1960) On the exact variance of products. Journal of the American Statistical Association, 55, 708-713.
MacKinnon, D. P. & Dwyer, J. H. (1993). Estimating mediated effects in prevention studies. Evaluation Review, 17, 144-158.
MacKinnon, D. P., Warsi, G., & Dwyer, J. H. (1995). A simulation study of mediated effect measures. Multivariate Behavioral Research, 30(1), 41-62.
Preacher, K. J. & Hayes, A. F. (2004). SPSS and SAS procedures for estimating indirect effects in simple mediation models. Behavior Research Methods, Instruments, & Computers, 36(4), 717-731.
Sobel, M.E. (1982) Asymptotic confidence intervals for indirect effects in structural equation models. Sociological Methodology, 13, 290-312.
Sobel, M.E. (1986) Some new results on indirect effects and their standard errors in covariance structure models. Sociological Methodology, 16, 159-186.



◆◆◆◆


精彩回顾


点击上图查看:

Stata寒假研讨班_2020年1月8日——1月11日_第13届“高级计量经济学及stata应用”研讨班@北京专场




点击上图查看:

Stata寒假研讨班_2020年1月15日——1月18日_第14届“高级计量经济学及stata应用”研讨班@北京专场


您可能也对以下帖子感兴趣

文章有问题?点此查看未经处理的缓存