“Mplus Path Analysis Example 3.18”的版本间的差异
来自OBHRM百科
Lichaoping(讨论 | 贡献) (→代码与注释) |
Lichaoping(讨论 | 贡献) (→代码与注释) |
||
第3行: | 第3行: | ||
==代码与注释== | ==代码与注释== | ||
− | <pre>TITLE: this is an example of moderated mediation with a plot of the indirect effect | + | <pre>TITLE: this is an example of moderated mediation with a plot of the indirect effect # 标题 |
− | DATA: FILE = ex3.18.dat; | + | DATA: FILE = ex3.18.dat; # 数据文件 |
− | VARIABLE:NAMES = y m x z; | + | VARIABLE:NAMES = y m x z; # 数据文件中变量的名称 |
− | USEVARIABLES = y m x z xz; | + | USEVARIABLES = y m x z xz; # 分析时使用哪些变量 |
− | DEFINE: xz = x*z; | + | DEFINE: xz = x*z; # 定义调节效应变量为xz(自己根据需要命名)xz等于x与z相乘 |
ANALYSIS:ESTIMATOR = BAYES; | ANALYSIS:ESTIMATOR = BAYES; | ||
PROCESSORS = 2; | PROCESSORS = 2; |
2017年3月17日 (五) 15:31的版本
示意图
代码与注释
TITLE: this is an example of moderated mediation with a plot of the indirect effect # 标题 DATA: FILE = ex3.18.dat; # 数据文件 VARIABLE:NAMES = y m x z; # 数据文件中变量的名称 USEVARIABLES = y m x z xz; # 分析时使用哪些变量 DEFINE: xz = x*z; # 定义调节效应变量为xz(自己根据需要命名)xz等于x与z相乘 ANALYSIS:ESTIMATOR = BAYES; PROCESSORS = 2; BITERATIONS = (30000); MODEL: y ON m (b) x z; m ON x (gamma1) z xz (gamma2); MODEL CONSTRAINT: PLOT(indirect); LOOP(mod,-2,2,0.1); indirect = b*(gamma1+gamma2*mod); PLOT: TYPE = PLOT2; OUTPUT: STANDARDIZED TECH8;