“Mplus Path Analysis Example 3.18”的版本间的差异

来自OBHRM百科
跳转至: 导航搜索
第1行: 第1行:
 
==示意图==
 
==示意图==
 
[[文件:0318.jpg | center | 800px]]
 
[[文件:0318.jpg | center | 800px]]
 +
 +
==代码与注释==
 +
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;
 +
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;

2017年3月17日 (五) 15:27的版本

示意图

0318.jpg

代码与注释

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; 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;