Mplus model80 模型讲解

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

多重中介效应分析:Mplus实战教程

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

理论模型

数学模型

数学公式1

模型方程:

Y = b0 + b1M1 + b2M2 + b3M3 + c'X
M1 = a01 + a1X
M2 = a02 + a2X
M3 = a03 + a3X + d1M1 + d2M2

数学公式2

模型方程:

Y = b0 + b1M1 + b2M2 + b3M3 + c'X
M1 = a01 + a1X
M2 = a02 + a2X
M3 = a03 + a3X + d1M1 + d2M2
将 M1 和 M2 的表达式代入 Y 的方程:

Y = b0 + b1(a01 + a1X) + b2(a02 + a2X) + b3M3 + c'X

同时,也将M1 和 M2 代入M3的方程:

M3 = a03 + a3X + d1(a01 + a1X) + d2(a02 + a2X)

数学公式3

模型方程:

Y = b0 + b1M1 + b2M2 + b3M3 + c'X
M1 = a01 + a1X
M2 = a02 + a2X
M3 = a03 + a3X + d1M1 + d2M2
将 M1 和 M2 的表达式代入 Y 的方程:

Y = b0 + b1(a01 + a1X) + b2(a02 + a2X) + b3M3 + c'X

同时,也将M1 和 M2 代入M3的方程:

M3 = a03 + a3X + d1(a01 + a1X) + d2(a02 + a2X)
将 M3 的表达式代入 Y 的方程:

Y = b0 + b1(a01 + a1X) + b2(a02 + a2X) + b3(a03 + a3X + d1(a01 + a1X) + d2(a02 + a2X)) + c'X

数学公式4

模型方程:

Y = b0 + b1M1 + b2M2 + b3M3 + c'X
M1 = a01 + a1X
M2 = a02 + a2X
M3 = a03 + a3X + d1M1 + d2M2
将 M1 和 M2 的表达式代入 Y 的方程:

Y = b0 + b1(a01 + a1X) + b2(a02 + a2X) + b3M3 + c'X

同时,也将M1 和 M2 代入M3的方程:

M3 = a03 + a3X + d1(a01 + a1X) + d2(a02 + a2X)
将 M3 的表达式代入 Y 的方程:

Y = b0 + b1(a01 + a1X) + b2(a02 + a2X) + b3(a03 + a3X + d1(a01 + a1X) + d2(a02 + a2X)) + c'X
展开括号:

Y = b0 + a01b1 + a1b1X + a02b2 + a2b2X + a03b3 + a3b3X + a01d1b3 + a1d1b3X + a02d2b3 + a2d2b3X + c'X

数学公式5

模型方程:

Y = b0 + b1M1 + b2M2 + b3M3 + c'X
M1 = a01 + a1X
M2 = a02 + a2X
M3 = a03 + a3X + d1M1 + d2M2
将 M1 和 M2 的表达式代入 Y 的方程:

Y = b0 + b1(a01 + a1X) + b2(a02 + a2X) + b3M3 + c'X

同时,也将M1 和 M2 代入M3的方程:

M3 = a03 + a3X + d1(a01 + a1X) + d2(a02 + a2X)
将 M3 的表达式代入 Y 的方程:

Y = b0 + b1(a01 + a1X) + b2(a02 + a2X) + b3(a03 + a3X + d1(a01 + a1X) + d2(a02 + a2X)) + c'X
展开括号:

Y = b0 + a01b1 + a1b1X + a02b2 + a2b2X + a03b3 + a3b3X + a01d1b3 + a1d1b3X + a02d2b3 + a2d2b3X + c'X
将常数项和含X的项分别组合:

Y = (b0 + a01b1 + a02b2 + a03b3 + a01d1b3 + a02d2b3) + (a1b1 + a2b2 + a3b3 + a1d1b3 + a2d2b3 + c')X

数学公式6

模型方程:

Y = b0 + b1M1 + b2M2 + b3M3 + c'X
M1 = a01 + a1X
M2 = a02 + a2X
M3 = a03 + a3X + d1M1 + d2M2
将 M1 和 M2 的表达式代入 Y 的方程:

Y = b0 + b1(a01 + a1X) + b2(a02 + a2X) + b3M3 + c'X

同时,也将M1 和 M2 代入M3的方程:

M3 = a03 + a3X + d1(a01 + a1X) + d2(a02 + a2X)
将 M3 的表达式代入 Y 的方程:

Y = b0 + b1(a01 + a1X) + b2(a02 + a2X) + b3(a03 + a3X + d1(a01 + a1X) + d2(a02 + a2X)) + c'X
展开括号:

Y = b0 + a01b1 + a1b1X + a02b2 + a2b2X + a03b3 + a3b3X + a01d1b3 + a1d1b3X + a02d2b3 + a2d2b3X + c'X
将常数项和含X的项分别组合:

Y = (b0 + a01b1 + a02b2 + a03b3 + a01d1b3 + a02d2b3) + (a1b1 + a2b2 + a3b3 + a1d1b3 + a2d2b3 + c')X
最终表达式:

截距项(常数项):a = (b0 + a01b1 + a02b2 + a03b3 + a01d1b3 + a02d2b3)

斜率项(X 的系数):b = (a1b1 + a2b2 + a3b3 + a1d1b3 + a2d2b3 + c')

数学公式7

模型方程:

Y = b0 + b1M1 + b2M2 + b3M3 + c'X
M1 = a01 + a1X
M2 = a02 + a2X
M3 = a03 + a3X + d1M1 + d2M2
将 M1 和 M2 的表达式代入 Y 的方程:

Y = b0 + b1(a01 + a1X) + b2(a02 + a2X) + b3M3 + c'X

同时,也将M1 和 M2 代入M3的方程:

M3 = a03 + a3X + d1(a01 + a1X) + d2(a02 + a2X)
将 M3 的表达式代入 Y 的方程:

Y = b0 + b1(a01 + a1X) + b2(a02 + a2X) + b3(a03 + a3X + d1(a01 + a1X) + d2(a02 + a2X)) + c'X
展开括号:

Y = b0 + a01b1 + a1b1X + a02b2 + a2b2X + a03b3 + a3b3X + a01d1b3 + a1d1b3X + a02d2b3 + a2d2b3X + c'X
将常数项和含X的项分别组合:

Y = (b0 + a01b1 + a02b2 + a03b3 + a01d1b3 + a02d2b3) + (a1b1 + a2b2 + a3b3 + a1d1b3 + a2d2b3 + c')X
最终表达式:

截距项(常数项):a = (b0 + a01b1 + a02b2 + a03b3 + a01d1b3 + a02d2b3)

斜率项(X 的系数):b = (a1b1 + a2b2 + a3b3 + a1d1b3 + a2d2b3 + c')
效应分解:

五个间接效应:

a1b1: X 通过 M1 对 Y 的间接效应
a2b2: X 通过 M2 对 Y 的间接效应
a3b3: X 通过 M3 对 Y 的间接效应
a1b3d1: X 通过 M1 和 M3 对 Y 的间接效应
a2b3d2: X 通过 M2 和 M3 对 Y 的间接效应

一个直接效应:

c': X 直接对 Y 的效应

代码解读1

! Predictor variable - X
! Mediator variable(s)  M1, M2, M3
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X M1 M2 M3 Y;

代码解读2

! Predictor variable - X
! Mediator variable(s)  M1, M2, M3
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X M1 M2 M3 Y;
ANALYSIS:

 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;

代码解读3

! Predictor variable - X
! Mediator variable(s)  M1, M2, M3
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X M1 M2 M3 Y;
ANALYSIS:

 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;
! In model statement name each path using parentheses
MODEL:

 Y ON M1 (b1);
 Y ON M2 (b2);
 Y ON M3 (b3);
 Y ON X (cdash);

代码解读4

! Predictor variable - X
! Mediator variable(s)  M1, M2, M3
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X M1 M2 M3 Y;
ANALYSIS:

 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;
! In model statement name each path using parentheses
MODEL:

 Y ON M1 (b1);
 Y ON M2 (b2);
 Y ON M3 (b3);
 Y ON X (cdash);
! direct effect of X on Y
 M1 ON X (a1);
 M2 ON X (a2);
 M3 ON X (a3);
 M3 ON M1 (d1);
 M3 ON M2 (d2);

代码解读5

! Predictor variable - X
! Mediator variable(s)  M1, M2, M3
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X M1 M2 M3 Y;
ANALYSIS:

 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;
! In model statement name each path using parentheses
MODEL:

 Y ON M1 (b1);
 Y ON M2 (b2);
 Y ON M3 (b3);
 Y ON X (cdash);
! direct effect of X on Y
 M1 ON X (a1);
 M2 ON X (a2);
 M3 ON X (a3);
 M3 ON M1 (d1);
 M3 ON M2 (d2);
! Use model constraint to calculate specific indirect paths and total indirect effect
MODEL CONSTRAINT:
 NEW(a1b1 a2b2 a3b3 a1d1b3 a2d2b3 TOTALIND TOTAL);

代码解读6

! Predictor variable - X
! Mediator variable(s)  M1, M2, M3
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X M1 M2 M3 Y;
ANALYSIS:

 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;
! In model statement name each path using parentheses
MODEL:

 Y ON M1 (b1);
 Y ON M2 (b2);
 Y ON M3 (b3);
 Y ON X (cdash);
! direct effect of X on Y
 M1 ON X (a1);
 M2 ON X (a2);
 M3 ON X (a3);
 M3 ON M1 (d1);
 M3 ON M2 (d2);
! Use model constraint to calculate specific indirect paths and total indirect effect
MODEL CONSTRAINT:
 NEW(a1b1 a2b2 a3b3 a1d1b3 a2d2b3 TOTALIND TOTAL);
a1b1 = a1*b1;
! Specific indirect effect of X on Y via M1 only

a2b2 = a2*b2;
! Specific indirect effect of X on Y via M2 only

代码解读7

! Predictor variable - X
! Mediator variable(s)  M1, M2, M3
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X M1 M2 M3 Y;
ANALYSIS:

 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;
! In model statement name each path using parentheses
MODEL:

 Y ON M1 (b1);
 Y ON M2 (b2);
 Y ON M3 (b3);
 Y ON X (cdash);
! direct effect of X on Y
 M1 ON X (a1);
 M2 ON X (a2);
 M3 ON X (a3);
 M3 ON M1 (d1);
 M3 ON M2 (d2);
! Use model constraint to calculate specific indirect paths and total indirect effect
MODEL CONSTRAINT:
 NEW(a1b1 a2b2 a3b3 a1d1b3 a2d2b3 TOTALIND TOTAL);
a1b1 = a1*b1;
! Specific indirect effect of X on Y via M1 only

a2b2 = a2*b2;
! Specific indirect effect of X on Y via M2 only
a3b3 = a3*b3;
! Specific indirect effect of X on Y via M3 only

a1d1b3 = a1*d1*b3;
! Specific indirect effect of X on Y via M1 and M3

代码解读8

! Predictor variable - X
! Mediator variable(s)  M1, M2, M3
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X M1 M2 M3 Y;
ANALYSIS:

 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;
! In model statement name each path using parentheses
MODEL:

 Y ON M1 (b1);
 Y ON M2 (b2);
 Y ON M3 (b3);
 Y ON X (cdash);
! direct effect of X on Y
 M1 ON X (a1);
 M2 ON X (a2);
 M3 ON X (a3);
 M3 ON M1 (d1);
 M3 ON M2 (d2);
! Use model constraint to calculate specific indirect paths and total indirect effect
MODEL CONSTRAINT:
 NEW(a1b1 a2b2 a3b3 a1d1b3 a2d2b3 TOTALIND TOTAL);
a1b1 = a1*b1;
! Specific indirect effect of X on Y via M1 only

a2b2 = a2*b2;
! Specific indirect effect of X on Y via M2 only
a3b3 = a3*b3;
! Specific indirect effect of X on Y via M3 only

a1d1b3 = a1*d1*b3;
! Specific indirect effect of X on Y via M1 and M3
a2d2b3 = a2*d2*b3;
! Specific indirect effect of X on Y via M2 and M3

TOTALIND = a1b1 + a2b2 + a3b3 + a1d1b3 + a2d2b3;

代码解读9

! Predictor variable - X
! Mediator variable(s)  M1, M2, M3
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X M1 M2 M3 Y;
ANALYSIS:

 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;
! In model statement name each path using parentheses
MODEL:

 Y ON M1 (b1);
 Y ON M2 (b2);
 Y ON M3 (b3);
 Y ON X (cdash);
! direct effect of X on Y
 M1 ON X (a1);
 M2 ON X (a2);
 M3 ON X (a3);
 M3 ON M1 (d1);
 M3 ON M2 (d2);
! Use model constraint to calculate specific indirect paths and total indirect effect
MODEL CONSTRAINT:
 NEW(a1b1 a2b2 a3b3 a1d1b3 a2d2b3 TOTALIND TOTAL);
a1b1 = a1*b1;
! Specific indirect effect of X on Y via M1 only

a2b2 = a2*b2;
! Specific indirect effect of X on Y via M2 only
a3b3 = a3*b3;
! Specific indirect effect of X on Y via M3 only

a1d1b3 = a1*d1*b3;
! Specific indirect effect of X on Y via M1 and M3
a2d2b3 = a2*d2*b3;
! Specific indirect effect of X on Y via M2 and M3

TOTALIND = a1b1 + a2b2 + a3b3 + a1d1b3 + a2d2b3;
! Total indirect effect of X on Y via M1, M2, M3

TOTAL = a1b1 + a2b2 + a3b3 + a1d1b3 + a2d2b3 + cdash;
! Total effect of X on Y

代码解读10

! Predictor variable - X
! Mediator variable(s)  M1, M2, M3
! Moderator variable(s) - none
! Outcome variable - Y
USEVARIABLES = X M1 M2 M3 Y;
ANALYSIS:

 TYPE = GENERAL;
 ESTIMATOR = ML;
 BOOTSTRAP = 10000;
! In model statement name each path using parentheses
MODEL:

 Y ON M1 (b1);
 Y ON M2 (b2);
 Y ON M3 (b3);
 Y ON X (cdash);
! direct effect of X on Y
 M1 ON X (a1);
 M2 ON X (a2);
 M3 ON X (a3);
 M3 ON M1 (d1);
 M3 ON M2 (d2);
! Use model constraint to calculate specific indirect paths and total indirect effect
MODEL CONSTRAINT:
 NEW(a1b1 a2b2 a3b3 a1d1b3 a2d2b3 TOTALIND TOTAL);
a1b1 = a1*b1;
! Specific indirect effect of X on Y via M1 only

a2b2 = a2*b2;
! Specific indirect effect of X on Y via M2 only
a3b3 = a3*b3;
! Specific indirect effect of X on Y via M3 only

a1d1b3 = a1*d1*b3;
! Specific indirect effect of X on Y via M1 and M3
a2d2b3 = a2*d2*b3;
! Specific indirect effect of X on Y via M2 and M3

TOTALIND = a1b1 + a2b2 + a3b3 + a1d1b3 + a2d2b3;
! Total indirect effect of X on Y via M1, M2, M3

TOTAL = a1b1 + a2b2 + a3b3 + a1d1b3 + a2d2b3 + cdash;
! Total effect of X on Y
OUTPUT:

 STAND CINT(bcbootstrap);

资源汇总

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