Mplus model503 模型讲解

来自图书《MPlus中介调节模型》

Mplus非线性中介效应分析教程

  • 理论模型
  • 数学模型
  • 数学推导
  • 代码解读

理论模型

数学模型

数学公式1

模型公式:
Y = b0 + b1M + c1'X + c2'XX
M = a0 + a1X + a2XX

数学公式2

模型公式:
Y = b0 + b1M + c1'X + c2'XX
M = a0 + a1X + a2XX
求导计算:
dY/dX = c1' + 2c2'X
dY/dM = b1
dM/dX = a1 + 2a2X

数学公式3

模型公式:
Y = b0 + b1M + c1'X + c2'XX
M = a0 + a1X + a2XX
求导计算:
dY/dX = c1' + 2c2'X
dY/dM = b1
dM/dX = a1 + 2a2X
计算间接效应:
瞬时间接效应 (IIE) = (a1 + 2a2X)b1

数学公式4

模型公式:
Y = b0 + b1M + c1'X + c2'XX
M = a0 + a1X + a2XX
求导计算:
dY/dX = c1' + 2c2'X
dY/dM = b1
dM/dX = a1 + 2a2X
计算间接效应:
瞬时间接效应 (IIE) = (a1 + 2a2X)b1
计算直接效应:
瞬时直接效应 (IDE) = c1' + 2c2'X

代码解读1

! Predictor variable(s) - X, XX
! Mediator variable(s)  M
! Moderator variable(s) - none
! Outcome variable - Y

代码解读2

! Predictor variable(s) - X, XX
! Mediator variable(s)  M
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X XX M Y;

代码解读3

! Predictor variable(s) - X, XX
! Mediator variable(s)  M
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X XX M Y;
ANALYSIS:
 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;

代码解读4

! Predictor variable(s) - X, XX
! Mediator variable(s)  M
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X XX M Y;
ANALYSIS:
 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;
MODEL:
 Y ON M (b1);
 Y ON X (cdash1); 
! direct effect of X on Y
 Y ON XX (cdash2); 
! direct effect of X on Y
 M ON X (a1);
 M ON XX (a2);

代码解读5

! Predictor variable(s) - X, XX
! Mediator variable(s)  M
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X XX M Y;
ANALYSIS:
 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;
MODEL:
 Y ON M (b1);
 Y ON X (cdash1); 
! direct effect of X on Y
 Y ON XX (cdash2); 
! direct effect of X on Y
 M ON X (a1);
 M ON XX (a2);
MODEL CONSTRAINT:
 NEW(LOW_X MED_X HIGH_X
 IIE_LOWX IIE_MEDX IIE_HIX
 IDE_LOWX IDE_MEDX IDE_HIX);
 LOW_X = #LOWX;
! replace #LOWX in the code with your chosen low value of X
 MED_X = #MEDX;
! replace #MEDX in the code with your chosen medium value of X
 HIGH_X = #HIGHX;
! replace #HIGHX in the code with your chosen high value of X
! Calc instantaneous indirect effects for low, medium, high values of X
 IIE_LOWX = (a1 + 2*a2*LOW_X)*b1;
 IIE_MEDX = (a1 + 2*a2*MED_X)*b1;
 IIE_HIX = (a1 + 2*a2*HIGH_X)*b1;
! Calc instantaneous direct effects for low, medium, high values of X
 IDE_LOWX = cdash1 + 2*cdash2*LOW_X;
 IDE_MEDX = cdash1 + 2*cdash2*MED_X;
 IDE_HIX = cdash1 + 2*cdash2*HIGH_X;

代码解读6

! Predictor variable(s) - X, XX
! Mediator variable(s)  M
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X XX M Y;
ANALYSIS:
 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;
MODEL:
 Y ON M (b1);
 Y ON X (cdash1); 
! direct effect of X on Y
 Y ON XX (cdash2); 
! direct effect of X on Y
 M ON X (a1);
 M ON XX (a2);
MODEL CONSTRAINT:
 NEW(LOW_X MED_X HIGH_X
 IIE_LOWX IIE_MEDX IIE_HIX
 IDE_LOWX IDE_MEDX IDE_HIX);
 LOW_X = #LOWX;
! replace #LOWX in the code with your chosen low value of X
 MED_X = #MEDX;
! replace #MEDX in the code with your chosen medium value of X
 HIGH_X = #HIGHX;
! replace #HIGHX in the code with your chosen high value of X
! Calc instantaneous indirect effects for low, medium, high values of X
 IIE_LOWX = (a1 + 2*a2*LOW_X)*b1;
 IIE_MEDX = (a1 + 2*a2*MED_X)*b1;
 IIE_HIX = (a1 + 2*a2*HIGH_X)*b1;
! Calc instantaneous direct effects for low, medium, high values of X
 IDE_LOWX = cdash1 + 2*cdash2*LOW_X;
 IDE_MEDX = cdash1 + 2*cdash2*MED_X;
 IDE_HIX = cdash1 + 2*cdash2*HIGH_X;
! Use loop plot to plot instantaneous indirect effect of X on Y
! 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(IIEX);
 LOOP(XVAL,1,5,0.1);
 IIEX = (a1*b1 + 2*a2*b1*XVAL)*XVAL;

代码解读7

! Predictor variable(s) - X, XX
! Mediator variable(s)  M
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X XX M Y;
ANALYSIS:
 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;
MODEL:
 Y ON M (b1);
 Y ON X (cdash1); 
! direct effect of X on Y
 Y ON XX (cdash2); 
! direct effect of X on Y
 M ON X (a1);
 M ON XX (a2);
MODEL CONSTRAINT:
 NEW(LOW_X MED_X HIGH_X
 IIE_LOWX IIE_MEDX IIE_HIX
 IDE_LOWX IDE_MEDX IDE_HIX);
 LOW_X = #LOWX;
! replace #LOWX in the code with your chosen low value of X
 MED_X = #MEDX;
! replace #MEDX in the code with your chosen medium value of X
 HIGH_X = #HIGHX;
! replace #HIGHX in the code with your chosen high value of X
! Calc instantaneous indirect effects for low, medium, high values of X
 IIE_LOWX = (a1 + 2*a2*LOW_X)*b1;
 IIE_MEDX = (a1 + 2*a2*MED_X)*b1;
 IIE_HIX = (a1 + 2*a2*HIGH_X)*b1;
! Calc instantaneous direct effects for low, medium, high values of X
 IDE_LOWX = cdash1 + 2*cdash2*LOW_X;
 IDE_MEDX = cdash1 + 2*cdash2*MED_X;
 IDE_HIX = cdash1 + 2*cdash2*HIGH_X;
! Use loop plot to plot instantaneous indirect effect of X on Y
! 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(IIEX);
 LOOP(XVAL,1,5,0.1);
 IIEX = (a1*b1 + 2*a2*b1*XVAL)*XVAL;
PLOT:
 TYPE = plot2;

代码解读8

! Predictor variable(s) - X, XX
! Mediator variable(s)  M
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X XX M Y;
ANALYSIS:
 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;
MODEL:
 Y ON M (b1);
 Y ON X (cdash1); 
! direct effect of X on Y
 Y ON XX (cdash2); 
! direct effect of X on Y
 M ON X (a1);
 M ON XX (a2);
MODEL CONSTRAINT:
 NEW(LOW_X MED_X HIGH_X
 IIE_LOWX IIE_MEDX IIE_HIX
 IDE_LOWX IDE_MEDX IDE_HIX);
 LOW_X = #LOWX;
! replace #LOWX in the code with your chosen low value of X
 MED_X = #MEDX;
! replace #MEDX in the code with your chosen medium value of X
 HIGH_X = #HIGHX;
! replace #HIGHX in the code with your chosen high value of X
! Calc instantaneous indirect effects for low, medium, high values of X
 IIE_LOWX = (a1 + 2*a2*LOW_X)*b1;
 IIE_MEDX = (a1 + 2*a2*MED_X)*b1;
 IIE_HIX = (a1 + 2*a2*HIGH_X)*b1;
! Calc instantaneous direct effects for low, medium, high values of X
 IDE_LOWX = cdash1 + 2*cdash2*LOW_X;
 IDE_MEDX = cdash1 + 2*cdash2*MED_X;
 IDE_HIX = cdash1 + 2*cdash2*HIGH_X;
! Use loop plot to plot instantaneous indirect effect of X on Y
! 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(IIEX);
 LOOP(XVAL,1,5,0.1);
 IIEX = (a1*b1 + 2*a2*b1*XVAL)*XVAL;
PLOT:
 TYPE = plot2;
OUTPUT:
 STAND CINT(bcbootstrap);

资源汇总

  • 本视频讲义地址: https://mlln.cn/mplus-model-templates/model503.html
  • 图书《MPlus中介调节模型》打包下载: 点击下载
  • 图书《MPlus中介调节模型》在线看: 点击查看
  • 视频教程: 点击这里打开视频
  • Mplus 模型模板教程列表: https://mlln.cn/mplus-model-templates
  • 统计咨询: https://wx.zsxq.com/group/88888188828842