大数跨境
0
0

One_By_One clip——Model 3

One_By_One clip——Model 3 SEM结构方程模型
2018-12-16
2
导读:Moderation model with two moderators

Figure 1. Conceptual model


Figure 2. Statistical model


Mplus syntax for model above:

! Commands before USEVARIABLES are omitted intentionally, please refer to the 1st clip if necessary.

! Predictor variable - X
! Moderator variable(s) - W, Z
! Outcome variable - Y
USEVARIABLES = X W Y XW XZ;
! Create interaction terms
! Note as new vars they have to be placed at end of USEVARIABLES subcommand above
DEFINE:
XW = X*W;
XZ = X*Z;
ANALYSIS:
TYPE = GENERAL;
ESTIMATOR = ML;
BOOTSTRAP = 5000;
! In model statement name each path, and intercept, using parentheses
MODEL:
[Y] (b0);
Y ON X (b1);
Y ON W (b2);
Y ON Z (b3);
Y ON XW (b4);
Y ON XZ (b5);
! Use model constraint subcommand to test simple slopes
! You need to pick low, medium and high moderator values for both W and Z,
! for example, of 1 SD below mean, mean, 1 SD above mean
! 2 moderators, 3 values for each, gives 9 combinations
! arbitrary naming convention for simple slopes used below:
! MEW_LOZ = medium value of W and low value of Z, etc.
MODEL CONSTRAINT:
NEW(LOW_W MED_W HIGH_W LOW_Z MED_Z HIGH_Z LOW_LOZ MEW_LOZ HIW_LOZ LOW_MEZ MEW_MEZ HIW_MEZ LOW_HIZ MEW_HIZ HIW_HIZ);
LOW_W = #LOWW; ! replace #LOWW in the code with your chosen low value of W
MED_W = #MEDW; ! replace #MEDW in the code with your chosen medium value of W

HIGH_W = #HIGHW; ! replace #HIGHW in the code with your chosen high value of W
LOW_Z = #LOWZ; ! replace #LOWZ in the code with your chosen low value of Z
MED_Z = #MEDZ; ! replace #MEDZ in the code with your chosen medium value of Z
HIGH_Z = #HIGHZ; ! replace #HIGHZ in the code with your chosen high value of Z
! Now calculate simple slopes for each value of W and Z
LOW_LOZ = b1 + b4*LOW_W + b5*LOW_Z;
MEW_LOZ = b1 + b4*MED_W + b5*LOW_Z;
HIW_LOZ = b1 + b4*HIGH_W + b5*LOW_Z;
LOW_MEZ = b1 + b4*LOW_W + b5*MED_Z;
MEW_MEZ = b1 + b4*MED_W + b5*MED_Z;
HIW_MEZ = b1 + b4*HIGH_W + b5*MED_Z;
LOW_HIZ = b1 + b4*LOW_W + b5*HIGH_Z;
MEW_HIZ = b1 + b4*MED_W + b5*HIGH_Z;
HIW_HIZ = b1 + b4*HIGH_W + b5*HIGH_Z;
! Use loop plot to plot model for all combinations of low, med, high values of W and Z
! NOTE - values of 1,5 in LOOP() statement need to be replaced by
! logical min and max limits of predictor X used in analysis
PLOT(PLOW_LOZ PMEW_LOZ PHIW_LOZ PLOW_MEZ PMEW_MEZ PHIW_MEZ
PLOW_HIZ PMEW_HIZ PHIW_HIZ);
LOOP(XVAL,1,5,0.1);
PLOW_LOZ = (b0 + b2*LOW_W + b3*LOW_Z) + LOW_LOZ*XVAL;
PMEW_LOZ = (b0 + b2*MED_W + b3*LOW_Z) + MEW_LOZ*XVAL;
PHIW_LOZ = (b0 + b2*HIGH_W + b3*LOW_Z) + HIW_LOZ*XVAL;
PLOW_MEZ = (b0 + b2*LOW_W + b3*MED_Z) + LOW_MEZ*XVAL;
PMEW_MEZ = (b0 + b2*MED_W + b3*MED_Z) + MEW_MEZ*XVAL;
PHIW_MEZ = (b0 + b2*HIGH_W + b3*MED_Z) + HIW_MEZ*XVAL;
PLOW_HIZ = (b0 + b2*LOW_W + b3*HIGH_Z) + LOW_HIZ*XVAL;
PMEW_HIZ = (b0 + b2*MED_W + b3*HIGH_Z) + MEW_HIZ*XVAL;
PHIW_HIZ = (b0 + b2*HIGH_W + b3*HIGH_Z) + HIW_HIZ*XVAL;
PLOT:
TYPE = plot2;
OUTPUT:
STAND CINT(bcbootstrap);

【声明】内容源于网络
0
0
SEM结构方程模型
本平台致力于以下3个方面的工作:1.介绍结构方程模型的原理;2.介绍结构方程模型的软件操作,主推Mplus软件;3.定期更新关于结构方程模型领域的前沿方法学文献,追踪最新的研究进展
内容 96
粉丝 0
SEM结构方程模型 本平台致力于以下3个方面的工作:1.介绍结构方程模型的原理;2.介绍结构方程模型的软件操作,主推Mplus软件;3.定期更新关于结构方程模型领域的前沿方法学文献,追踪最新的研究进展
总阅读6
粉丝0
内容96