Mplus model53latent 模型讲解

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

Mplus中介、调节与调节中介效应模型构建教程

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

理论模型

数学模型

数学公式1

模型方程:

Y = b0 + b1M + b2V + b3Q + b4MV + b5MQ + b6VQ + b7MVQ + c1'X + c2'W + c3'Z + c4'XW + c5'XZ

M = a0 + a1X + a2W + a3Z + a4XW + a5XZ

数学公式2

模型方程:

Y = b0 + b1M + b2V + b3Q + b4MV + b5MQ + b6VQ + b7MVQ + c1'X + c2'W + c3'Z + c4'XW + c5'XZ

M = a0 + a1X + a2W + a3Z + a4XW + a5XZ
将M的表达式代入Y:

Y = b0 + b1(a0 + a1X + a2W + a3Z + a4XW + a5XZ) + b2V + b3Q + b4(a0 + a1X + a2W + a3Z + a4XW + a5XZ)V + b5(a0 + a1X + a2W + a3Z + a4XW + a5XZ)Q + b6VQ + b7(a0 + a1X + a2W + a3Z + a4XW + a5XZ)VQ + c1'X + c2'W + c3'Z + c4'XW + c5'XZ

数学公式3

模型方程:

Y = b0 + b1M + b2V + b3Q + b4MV + b5MQ + b6VQ + b7MVQ + c1'X + c2'W + c3'Z + c4'XW + c5'XZ

M = a0 + a1X + a2W + a3Z + a4XW + a5XZ
将M的表达式代入Y:

Y = b0 + b1(a0 + a1X + a2W + a3Z + a4XW + a5XZ) + b2V + b3Q + b4(a0 + a1X + a2W + a3Z + a4XW + a5XZ)V + b5(a0 + a1X + a2W + a3Z + a4XW + a5XZ)Q + b6VQ + b7(a0 + a1X + a2W + a3Z + a4XW + a5XZ)VQ + c1'X + c2'W + c3'Z + c4'XW + c5'XZ
展开括号:

Y = b0 + a0b1 + a1b1X + a2b1W + a3b1Z + a4b1XW + a5b1XZ + b2V + b3Q + a0b4V + a1b4XV + a2b4WV + a3b4ZV + a4b4XWV + a5b4XZV + a0b5Q + a1b5XQ + a2b5WQ + a3b5ZQ + a4b5XWQ + a5b5XZQ + b6VQ + a0b7VQ + a1b7XVQ + a2b7WVQ + a3b7ZVQ + a4b7XWVQ + a5b7XZVQ + c1'X + c2'W + c3'Z + c4'XW + c5'XZ

数学公式4

模型方程:

Y = b0 + b1M + b2V + b3Q + b4MV + b5MQ + b6VQ + b7MVQ + c1'X + c2'W + c3'Z + c4'XW + c5'XZ

M = a0 + a1X + a2W + a3Z + a4XW + a5XZ
将M的表达式代入Y:

Y = b0 + b1(a0 + a1X + a2W + a3Z + a4XW + a5XZ) + b2V + b3Q + b4(a0 + a1X + a2W + a3Z + a4XW + a5XZ)V + b5(a0 + a1X + a2W + a3Z + a4XW + a5XZ)Q + b6VQ + b7(a0 + a1X + a2W + a3Z + a4XW + a5XZ)VQ + c1'X + c2'W + c3'Z + c4'XW + c5'XZ
展开括号:

Y = b0 + a0b1 + a1b1X + a2b1W + a3b1Z + a4b1XW + a5b1XZ + b2V + b3Q + a0b4V + a1b4XV + a2b4WV + a3b4ZV + a4b4XWV + a5b4XZV + a0b5Q + a1b5XQ + a2b5WQ + a3b5ZQ + a4b5XWQ + a5b5XZQ + b6VQ + a0b7VQ + a1b7XVQ + a2b7WVQ + a3b7ZVQ + a4b7XWVQ + a5b7XZVQ + c1'X + c2'W + c3'Z + c4'XW + c5'XZ
整理成 Y = a + bX 的形式:

Y = (b0 + a0b1 + a2b1W + a3b1Z + b2V + b3Q + a0b4V + a2b4WV + a3b4ZV + a0b5Q + a2b5WQ + a3b5ZQ + b6VQ + a0b7VQ + a2b7WVQ + a3b7ZVQ + c2'W + c3'Z) + (a1b1 + a4b1W + a5b1Z + a1b4V + a4b4WV + a5b4ZV + a1b5Q + a4b5WQ + a5b5ZQ + a1b7VQ + a4b7WVQ + a5b7ZVQ + c1' + c4'W + c5'Z)X

数学公式5

模型方程:

Y = b0 + b1M + b2V + b3Q + b4MV + b5MQ + b6VQ + b7MVQ + c1'X + c2'W + c3'Z + c4'XW + c5'XZ

M = a0 + a1X + a2W + a3Z + a4XW + a5XZ
将M的表达式代入Y:

Y = b0 + b1(a0 + a1X + a2W + a3Z + a4XW + a5XZ) + b2V + b3Q + b4(a0 + a1X + a2W + a3Z + a4XW + a5XZ)V + b5(a0 + a1X + a2W + a3Z + a4XW + a5XZ)Q + b6VQ + b7(a0 + a1X + a2W + a3Z + a4XW + a5XZ)VQ + c1'X + c2'W + c3'Z + c4'XW + c5'XZ
展开括号:

Y = b0 + a0b1 + a1b1X + a2b1W + a3b1Z + a4b1XW + a5b1XZ + b2V + b3Q + a0b4V + a1b4XV + a2b4WV + a3b4ZV + a4b4XWV + a5b4XZV + a0b5Q + a1b5XQ + a2b5WQ + a3b5ZQ + a4b5XWQ + a5b5XZQ + b6VQ + a0b7VQ + a1b7XVQ + a2b7WVQ + a3b7ZVQ + a4b7XWVQ + a5b7XZVQ + c1'X + c2'W + c3'Z + c4'XW + c5'XZ
整理成 Y = a + bX 的形式:

Y = (b0 + a0b1 + a2b1W + a3b1Z + b2V + b3Q + a0b4V + a2b4WV + a3b4ZV + a0b5Q + a2b5WQ + a3b5ZQ + b6VQ + a0b7VQ + a2b7WVQ + a3b7ZVQ + c2'W + c3'Z) + (a1b1 + a4b1W + a5b1Z + a1b4V + a4b4WV + a5b4ZV + a1b5Q + a4b5WQ + a5b5ZQ + a1b7VQ + a4b7WVQ + a5b7ZVQ + c1' + c4'W + c5'Z)X
X 对 Y 的间接效应 (在 W, Z, V, Q 的条件下):

(a1 + a4W + a5Z)(b1 + b4V + b5Q + b7VQ)

X 对 Y 的直接效应 (在 W, Z 的条件下):

c1' + c4'W + c5'Z

代码解读1

USEVARIABLES = X1 X2 X3 X4 M1 M2 M3 M4
W1 W2 W3 W4 Z1 Z2 Z3 Z4 V1 V2 V3 V4 Q1 Q2 Q3 Q4
Y1 Y2 Y3 Y4;

代码解读2

USEVARIABLES = X1 X2 X3 X4 M1 M2 M3 M4
W1 W2 W3 W4 Z1 Z2 Z3 Z4 V1 V2 V3 V4 Q1 Q2 Q3 Q4
Y1 Y2 Y3 Y4;
ANALYSIS:
 TYPE = GENERAL RANDOM;
 ESTIMATOR = ML;
 ALGORITHM = INTEGRATION;

代码解读3

USEVARIABLES = X1 X2 X3 X4 M1 M2 M3 M4
W1 W2 W3 W4 Z1 Z2 Z3 Z4 V1 V2 V3 V4 Q1 Q2 Q3 Q4
Y1 Y2 Y3 Y4;
ANALYSIS:
 TYPE = GENERAL RANDOM;
 ESTIMATOR = ML;
 ALGORITHM = INTEGRATION;
MODEL:
 X BY X1 X2 X3 X4;
 M BY M1 M2 M3 M4;
 W BY W1* W2 W3 W4;
 Z BY Z1* Z2 Z3 Z4;
 V BY V1* V2 V3 V4;
 Q BY Q1* Q2 Q3 Q4;
 Y BY Y1 Y2 Y3 Y4;
  W@1;  Z@1;  V@1;  Q@1;

代码解读4

USEVARIABLES = X1 X2 X3 X4 M1 M2 M3 M4
W1 W2 W3 W4 Z1 Z2 Z3 Z4 V1 V2 V3 V4 Q1 Q2 Q3 Q4
Y1 Y2 Y3 Y4;
ANALYSIS:
 TYPE = GENERAL RANDOM;
 ESTIMATOR = ML;
 ALGORITHM = INTEGRATION;
MODEL:
 X BY X1 X2 X3 X4;
 M BY M1 M2 M3 M4;
 W BY W1* W2 W3 W4;
 Z BY Z1* Z2 Z3 Z4;
 V BY V1* V2 V3 V4;
 Q BY Q1* Q2 Q3 Q4;
 Y BY Y1 Y2 Y3 Y4;
  W@1;  Z@1;  V@1;  Q@1;
MV | M XWITH V;
 MQ | M XWITH Q;
 XW | X XWITH W;
 XZ | X XWITH Z;
 VQ | V XWITH Q;
 MVQ | M XWITH VQ;

代码解读5

USEVARIABLES = X1 X2 X3 X4 M1 M2 M3 M4
W1 W2 W3 W4 Z1 Z2 Z3 Z4 V1 V2 V3 V4 Q1 Q2 Q3 Q4
Y1 Y2 Y3 Y4;
ANALYSIS:
 TYPE = GENERAL RANDOM;
 ESTIMATOR = ML;
 ALGORITHM = INTEGRATION;
MODEL:
 X BY X1 X2 X3 X4;
 M BY M1 M2 M3 M4;
 W BY W1* W2 W3 W4;
 Z BY Z1* Z2 Z3 Z4;
 V BY V1* V2 V3 V4;
 Q BY Q1* Q2 Q3 Q4;
 Y BY Y1 Y2 Y3 Y4;
  W@1;  Z@1;  V@1;  Q@1;
MV | M XWITH V;
 MQ | M XWITH Q;
 XW | X XWITH W;
 XZ | X XWITH Z;
 VQ | V XWITH Q;
 MVQ | M XWITH VQ;
Y ON M (b1);
 Y ON V (b2);
 Y ON Q (b3);
 Y ON MV (b4);
 Y ON MQ (b5);
 Y ON VQ (b6);
 Y ON MVQ (b7);
 Y ON X (cdash1);
 Y ON W (cdash2);
 Y ON Z (cdash3);
 Y ON XW (cdash4);
 Y ON XZ (cdash5);
 M ON X (a1);
 M ON W (a2);
 M ON Z (a3);
 M ON XW (a4);
 M ON XZ (a5);

代码解读6

USEVARIABLES = X1 X2 X3 X4 M1 M2 M3 M4
W1 W2 W3 W4 Z1 Z2 Z3 Z4 V1 V2 V3 V4 Q1 Q2 Q3 Q4
Y1 Y2 Y3 Y4;
ANALYSIS:
 TYPE = GENERAL RANDOM;
 ESTIMATOR = ML;
 ALGORITHM = INTEGRATION;
MODEL:
 X BY X1 X2 X3 X4;
 M BY M1 M2 M3 M4;
 W BY W1* W2 W3 W4;
 Z BY Z1* Z2 Z3 Z4;
 V BY V1* V2 V3 V4;
 Q BY Q1* Q2 Q3 Q4;
 Y BY Y1 Y2 Y3 Y4;
  W@1;  Z@1;  V@1;  Q@1;
MV | M XWITH V;
 MQ | M XWITH Q;
 XW | X XWITH W;
 XZ | X XWITH Z;
 VQ | V XWITH Q;
 MVQ | M XWITH VQ;
Y ON M (b1);
 Y ON V (b2);
 Y ON Q (b3);
 Y ON MV (b4);
 Y ON MQ (b5);
 Y ON VQ (b6);
 Y ON MVQ (b7);
 Y ON X (cdash1);
 Y ON W (cdash2);
 Y ON Z (cdash3);
 Y ON XW (cdash4);
 Y ON XZ (cdash5);
 M ON X (a1);
 M ON W (a2);
 M ON Z (a3);
 M ON XW (a4);
 M ON XZ (a5);
MODEL CONSTRAINT:
 NEW(LOW_W MED_W HIGH_W LOW_Z MED_Z HIGH_Z LOW_V MED_V HIGH_V LOW_Q MED_Q HIGH_Q
 ILLLL IMLLL IHLLL ILMLL IMMLL IHMLL ILHLL IMHLL IHHLL
 ILLML IMLML IHLML ILMML IMMML IHMML ILHML IMHML IHHML
 ILLHL IMLHL IHLHL ILMHL IMMHL IHMHL ILHHL IMHHL IHHHL
 ILLLM IMLLM IHLLM ILMLM IMMLM IHMLM ILHLM IMHLM IHHLM
 ILLMM IMLMM IHLMM ILMMM IMMMM IHMMM ILHMM IMHMM IHHMM
 ILLHM IMLHM IHLHM ILMHM IMMHM IHMHM ILHHM IMHHM IHHHM
 ILLLH IMLLH IHLLH ILMLH IMMLH IHMLH ILHLH IMHLH IHHLH
 ILLMH IMLMH IHLMH ILMMH IMMMH IHMMH ILHMH IMHMH IHHMH
 ILLHH IMLHH IHLHH ILMHH IMMHH IHMHH ILHHH IMHHH IHHHH
 DLOW_LOZ DMEW_LOZ DHIW_LOZ DLOW_MEZ DMEW_MEZ DHIW_MEZ
 DLOW_HIZ DMEW_HIZ DHIW_HIZ
 TLLLL TMLLL THLLL TLMLL TMMLL THMLL TLHLL TMHLL THHLL
 TLLML TMLML THLML TLMML TMMML THMML TLHML TMHML THHML
 TLLHL TMLHL THLHL TLMHL TMMHL THMHL TLHHL TMHHL THHHL
 TLLLM TMLLM THLLM TLMLM TMMLM THMLM TLHLM TMHLM THHLM
 TLLMM TMLMM THLMM TLMMM TMMMM THMMM TLHMM TMHMM THHMM
 TLLHM TMLHM THLHM TLMHM TMMHM THMHM TLHHM TMHHM THHHM
 TLLLH TMLLH THLLH TLMLH TMMLH THMLH TLHLH TMHLH THHLH
 TLLMH TMLMH THLMH TLMMH TMMMH THMMH TLHMH TMHMH THHMH
 TLLHH TMLHH THLHH TLMHH TMMHH THMHH TLHHH TMHHH THHHH);

代码解读7

USEVARIABLES = X1 X2 X3 X4 M1 M2 M3 M4
W1 W2 W3 W4 Z1 Z2 Z3 Z4 V1 V2 V3 V4 Q1 Q2 Q3 Q4
Y1 Y2 Y3 Y4;
ANALYSIS:
 TYPE = GENERAL RANDOM;
 ESTIMATOR = ML;
 ALGORITHM = INTEGRATION;
MODEL:
 X BY X1 X2 X3 X4;
 M BY M1 M2 M3 M4;
 W BY W1* W2 W3 W4;
 Z BY Z1* Z2 Z3 Z4;
 V BY V1* V2 V3 V4;
 Q BY Q1* Q2 Q3 Q4;
 Y BY Y1 Y2 Y3 Y4;
  W@1;  Z@1;  V@1;  Q@1;
MV | M XWITH V;
 MQ | M XWITH Q;
 XW | X XWITH W;
 XZ | X XWITH Z;
 VQ | V XWITH Q;
 MVQ | M XWITH VQ;
Y ON M (b1);
 Y ON V (b2);
 Y ON Q (b3);
 Y ON MV (b4);
 Y ON MQ (b5);
 Y ON VQ (b6);
 Y ON MVQ (b7);
 Y ON X (cdash1);
 Y ON W (cdash2);
 Y ON Z (cdash3);
 Y ON XW (cdash4);
 Y ON XZ (cdash5);
 M ON X (a1);
 M ON W (a2);
 M ON Z (a3);
 M ON XW (a4);
 M ON XZ (a5);
MODEL CONSTRAINT:
 NEW(LOW_W MED_W HIGH_W LOW_Z MED_Z HIGH_Z LOW_V MED_V HIGH_V LOW_Q MED_Q HIGH_Q
 ILLLL IMLLL IHLLL ILMLL IMMLL IHMLL ILHLL IMHLL IHHLL
 ILLML IMLML IHLML ILMML IMMML IHMML ILHML IMHML IHHML
 ILLHL IMLHL IHLHL ILMHL IMMHL IHMHL ILHHL IMHHL IHHHL
 ILLLM IMLLM IHLLM ILMLM IMMLM IHMLM ILHLM IMHLM IHHLM
 ILLMM IMLMM IHLMM ILMMM IMMMM IHMMM ILHMM IMHMM IHHMM
 ILLHM IMLHM IHLHM ILMHM IMMHM IHMHM ILHHM IMHHM IHHHM
 ILLLH IMLLH IHLLH ILMLH IMMLH IHMLH ILHLH IMHLH IHHLH
 ILLMH IMLMH IHLMH ILMMH IMMMH IHMMH ILHMH IMHMH IHHMH
 ILLHH IMLHH IHLHH ILMHH IMMHH IHMHH ILHHH IMHHH IHHHH
 DLOW_LOZ DMEW_LOZ DHIW_LOZ DLOW_MEZ DMEW_MEZ DHIW_MEZ
 DLOW_HIZ DMEW_HIZ DHIW_HIZ
 TLLLL TMLLL THLLL TLMLL TMMLL THMLL TLHLL TMHLL THHLL
 TLLML TMLML THLML TLMML TMMML THMML TLHML TMHML THHML
 TLLHL TMLHL THLHL TLMHL TMMHL THMHL TLHHL TMHHL THHHL
 TLLLM TMLLM THLLM TLMLM TMMLM THMLM TLHLM TMHLM THHLM
 TLLMM TMLMM THLMM TLMMM TMMMM THMMM TLHMM TMHMM THHMM
 TLLHM TMLHM THLHM TLMHM TMMHM THMHM TLHHM TMHHM THHHM
 TLLLH TMLLH THLLH TLMLH TMMLH THMLH TLHLH TMHLH THHLH
 TLLMH TMLMH THLMH TLMMH TMMMH THMMH TLHMH TMHMH THHMH
 TLLHH TMLHH THLHH TLMHH TMMHH THMHH TLHHH TMHHH THHHH);
LOW_W = -1;
 MED_W = 0;
 HIGH_W = 1;
 LOW_Z = -1;
 MED_Z = 0;
 HIGH_Z = 1;
 LOW_V = -1;
 MED_V = 0;
 HIGH_V = 1;
 LOW_Q = -1;
 MED_Q = 0;
 HIGH_Q = 1;

代码解读8

USEVARIABLES = X1 X2 X3 X4 M1 M2 M3 M4
W1 W2 W3 W4 Z1 Z2 Z3 Z4 V1 V2 V3 V4 Q1 Q2 Q3 Q4
Y1 Y2 Y3 Y4;
ANALYSIS:
 TYPE = GENERAL RANDOM;
 ESTIMATOR = ML;
 ALGORITHM = INTEGRATION;
MODEL:
 X BY X1 X2 X3 X4;
 M BY M1 M2 M3 M4;
 W BY W1* W2 W3 W4;
 Z BY Z1* Z2 Z3 Z4;
 V BY V1* V2 V3 V4;
 Q BY Q1* Q2 Q3 Q4;
 Y BY Y1 Y2 Y3 Y4;
  W@1;  Z@1;  V@1;  Q@1;
MV | M XWITH V;
 MQ | M XWITH Q;
 XW | X XWITH W;
 XZ | X XWITH Z;
 VQ | V XWITH Q;
 MVQ | M XWITH VQ;
Y ON M (b1);
 Y ON V (b2);
 Y ON Q (b3);
 Y ON MV (b4);
 Y ON MQ (b5);
 Y ON VQ (b6);
 Y ON MVQ (b7);
 Y ON X (cdash1);
 Y ON W (cdash2);
 Y ON Z (cdash3);
 Y ON XW (cdash4);
 Y ON XZ (cdash5);
 M ON X (a1);
 M ON W (a2);
 M ON Z (a3);
 M ON XW (a4);
 M ON XZ (a5);
MODEL CONSTRAINT:
 NEW(LOW_W MED_W HIGH_W LOW_Z MED_Z HIGH_Z LOW_V MED_V HIGH_V LOW_Q MED_Q HIGH_Q
 ILLLL IMLLL IHLLL ILMLL IMMLL IHMLL ILHLL IMHLL IHHLL
 ILLML IMLML IHLML ILMML IMMML IHMML ILHML IMHML IHHML
 ILLHL IMLHL IHLHL ILMHL IMMHL IHMHL ILHHL IMHHL IHHHL
 ILLLM IMLLM IHLLM ILMLM IMMLM IHMLM ILHLM IMHLM IHHLM
 ILLMM IMLMM IHLMM ILMMM IMMMM IHMMM ILHMM IMHMM IHHMM
 ILLHM IMLHM IHLHM ILMHM IMMHM IHMHM ILHHM IMHHM IHHHM
 ILLLH IMLLH IHLLH ILMLH IMMLH IHMLH ILHLH IMHLH IHHLH
 ILLMH IMLMH IHLMH ILMMH IMMMH IHMMH ILHMH IMHMH IHHMH
 ILLHH IMLHH IHLHH ILMHH IMMHH IHMHH ILHHH IMHHH IHHHH
 DLOW_LOZ DMEW_LOZ DHIW_LOZ DLOW_MEZ DMEW_MEZ DHIW_MEZ
 DLOW_HIZ DMEW_HIZ DHIW_HIZ
 TLLLL TMLLL THLLL TLMLL TMMLL THMLL TLHLL TMHLL THHLL
 TLLML TMLML THLML TLMML TMMML THMML TLHML TMHML THHML
 TLLHL TMLHL THLHL TLMHL TMMHL THMHL TLHHL TMHHL THHHL
 TLLLM TMLLM THLLM TLMLM TMMLM THMLM TLHLM TMHLM THHLM
 TLLMM TMLMM THLMM TLMMM TMMMM THMMM TLHMM TMHMM THHMM
 TLLHM TMLHM THLHM TLMHM TMMHM THMHM TLHHM TMHHM THHHM
 TLLLH TMLLH THLLH TLMLH TMMLH THMLH TLHLH TMHLH THHLH
 TLLMH TMLMH THLMH TLMMH TMMMH THMMH TLHMH TMHMH THHMH
 TLLHH TMLHH THLHH TLMHH TMMHH THMHH TLHHH TMHHH THHHH);
LOW_W = -1;
 MED_W = 0;
 HIGH_W = 1;
 LOW_Z = -1;
 MED_Z = 0;
 HIGH_Z = 1;
 LOW_V = -1;
 MED_V = 0;
 HIGH_V = 1;
 LOW_Q = -1;
 MED_Q = 0;
 HIGH_Q = 1;
ILLLL = a1*b1 + a4*b1*LOW_W + a5*b1*LOW_Z + a1*b4*LOW_V +
 a4*b4*LOW_W*LOW_V + a5*b4*LOW_Z*LOW_V + a1*b5*LOW_Q +
 a4*b5*LOW_W*LOW_Q + a5*b5*LOW_Z*LOW_Q + a1*b7*LOW_V*LOW_Q +
 a4*b7*LOW_W*LOW_V*LOW_Q + a5*b7*LOW_Z*LOW_V*LOW_Q;

代码解读9

USEVARIABLES = X1 X2 X3 X4 M1 M2 M3 M4
W1 W2 W3 W4 Z1 Z2 Z3 Z4 V1 V2 V3 V4 Q1 Q2 Q3 Q4
Y1 Y2 Y3 Y4;
ANALYSIS:
 TYPE = GENERAL RANDOM;
 ESTIMATOR = ML;
 ALGORITHM = INTEGRATION;
MODEL:
 X BY X1 X2 X3 X4;
 M BY M1 M2 M3 M4;
 W BY W1* W2 W3 W4;
 Z BY Z1* Z2 Z3 Z4;
 V BY V1* V2 V3 V4;
 Q BY Q1* Q2 Q3 Q4;
 Y BY Y1 Y2 Y3 Y4;
  W@1;  Z@1;  V@1;  Q@1;
MV | M XWITH V;
 MQ | M XWITH Q;
 XW | X XWITH W;
 XZ | X XWITH Z;
 VQ | V XWITH Q;
 MVQ | M XWITH VQ;
Y ON M (b1);
 Y ON V (b2);
 Y ON Q (b3);
 Y ON MV (b4);
 Y ON MQ (b5);
 Y ON VQ (b6);
 Y ON MVQ (b7);
 Y ON X (cdash1);
 Y ON W (cdash2);
 Y ON Z (cdash3);
 Y ON XW (cdash4);
 Y ON XZ (cdash5);
 M ON X (a1);
 M ON W (a2);
 M ON Z (a3);
 M ON XW (a4);
 M ON XZ (a5);
MODEL CONSTRAINT:
 NEW(LOW_W MED_W HIGH_W LOW_Z MED_Z HIGH_Z LOW_V MED_V HIGH_V LOW_Q MED_Q HIGH_Q
 ILLLL IMLLL IHLLL ILMLL IMMLL IHMLL ILHLL IMHLL IHHLL
 ILLML IMLML IHLML ILMML IMMML IHMML ILHML IMHML IHHML
 ILLHL IMLHL IHLHL ILMHL IMMHL IHMHL ILHHL IMHHL IHHHL
 ILLLM IMLLM IHLLM ILMLM IMMLM IHMLM ILHLM IMHLM IHHLM
 ILLMM IMLMM IHLMM ILMMM IMMMM IHMMM ILHMM IMHMM IHHMM
 ILLHM IMLHM IHLHM ILMHM IMMHM IHMHM ILHHM IMHHM IHHHM
 ILLLH IMLLH IHLLH ILMLH IMMLH IHMLH ILHLH IMHLH IHHLH
 ILLMH IMLMH IHLMH ILMMH IMMMH IHMMH ILHMH IMHMH IHHMH
 ILLHH IMLHH IHLHH ILMHH IMMHH IHMHH ILHHH IMHHH IHHHH
 DLOW_LOZ DMEW_LOZ DHIW_LOZ DLOW_MEZ DMEW_MEZ DHIW_MEZ
 DLOW_HIZ DMEW_HIZ DHIW_HIZ
 TLLLL TMLLL THLLL TLMLL TMMLL THMLL TLHLL TMHLL THHLL
 TLLML TMLML THLML TLMML TMMML THMML TLHML TMHML THHML
 TLLHL TMLHL THLHL TLMHL TMMHL THMHL TLHHL TMHHL THHHL
 TLLLM TMLLM THLLM TLMLM TMMLM THMLM TLHLM TMHLM THHLM
 TLLMM TMLMM THLMM TLMMM TMMMM THMMM TLHMM TMHMM THHMM
 TLLHM TMLHM THLHM TLMHM TMMHM THMHM TLHHM TMHHM THHHM
 TLLLH TMLLH THLLH TLMLH TMMLH THMLH TLHLH TMHLH THHLH
 TLLMH TMLMH THLMH TLMMH TMMMH THMMH TLHMH TMHMH THHMH
 TLLHH TMLHH THLHH TLMHH TMMHH THMHH TLHHH TMHHH THHHH);
LOW_W = -1;
 MED_W = 0;
 HIGH_W = 1;
 LOW_Z = -1;
 MED_Z = 0;
 HIGH_Z = 1;
 LOW_V = -1;
 MED_V = 0;
 HIGH_V = 1;
 LOW_Q = -1;
 MED_Q = 0;
 HIGH_Q = 1;
ILLLL = a1*b1 + a4*b1*LOW_W + a5*b1*LOW_Z + a1*b4*LOW_V +
 a4*b4*LOW_W*LOW_V + a5*b4*LOW_Z*LOW_V + a1*b5*LOW_Q +
 a4*b5*LOW_W*LOW_Q + a5*b5*LOW_Z*LOW_Q + a1*b7*LOW_V*LOW_Q +
 a4*b7*LOW_W*LOW_V*LOW_Q + a5*b7*LOW_Z*LOW_V*LOW_Q;
PLOT(PLLLL PMLLL PHLLL PLMLL PMMLL PHMLL PLHLL PMHLL PHHLL
 PLLML PMLML PHLML PLMML PMMML PHMML PLHML PMHML PHHML
 PLLHL PMLHL PHLHL PLMHL PMMHL PHMHL PLHHL PMHHL PHHHL
 PLLLM PMLLM PHLLM PLMLM PMMLM PHMLM PLHLM PMHLM PHHLM
 PLLMM PMLMM PHLMM PLMMM PMMMM PHMMM PLHMM PMHMM PHHMM
 PLLHM PMLHM PHLHM PLMHM PMMHM PHMHM PLHHM PMHHM PHHHM
 PLLLH PMLLH PHLLH PLMLH PMMLH PHMLH PLHLH PMHLH PHHLH
 PLLMH PMLMH PHLMH PLMMH PMMMH PHMMH PLHMH PMHMH PHHMH
 PLLHH PMLHH PHLHH PLMHH PMMHH PHMHH PLHHH PMHHH PHHHH);

代码解读10

USEVARIABLES = X1 X2 X3 X4 M1 M2 M3 M4
W1 W2 W3 W4 Z1 Z2 Z3 Z4 V1 V2 V3 V4 Q1 Q2 Q3 Q4
Y1 Y2 Y3 Y4;
ANALYSIS:
 TYPE = GENERAL RANDOM;
 ESTIMATOR = ML;
 ALGORITHM = INTEGRATION;
MODEL:
 X BY X1 X2 X3 X4;
 M BY M1 M2 M3 M4;
 W BY W1* W2 W3 W4;
 Z BY Z1* Z2 Z3 Z4;
 V BY V1* V2 V3 V4;
 Q BY Q1* Q2 Q3 Q4;
 Y BY Y1 Y2 Y3 Y4;
  W@1;  Z@1;  V@1;  Q@1;
MV | M XWITH V;
 MQ | M XWITH Q;
 XW | X XWITH W;
 XZ | X XWITH Z;
 VQ | V XWITH Q;
 MVQ | M XWITH VQ;
Y ON M (b1);
 Y ON V (b2);
 Y ON Q (b3);
 Y ON MV (b4);
 Y ON MQ (b5);
 Y ON VQ (b6);
 Y ON MVQ (b7);
 Y ON X (cdash1);
 Y ON W (cdash2);
 Y ON Z (cdash3);
 Y ON XW (cdash4);
 Y ON XZ (cdash5);
 M ON X (a1);
 M ON W (a2);
 M ON Z (a3);
 M ON XW (a4);
 M ON XZ (a5);
MODEL CONSTRAINT:
 NEW(LOW_W MED_W HIGH_W LOW_Z MED_Z HIGH_Z LOW_V MED_V HIGH_V LOW_Q MED_Q HIGH_Q
 ILLLL IMLLL IHLLL ILMLL IMMLL IHMLL ILHLL IMHLL IHHLL
 ILLML IMLML IHLML ILMML IMMML IHMML ILHML IMHML IHHML
 ILLHL IMLHL IHLHL ILMHL IMMHL IHMHL ILHHL IMHHL IHHHL
 ILLLM IMLLM IHLLM ILMLM IMMLM IHMLM ILHLM IMHLM IHHLM
 ILLMM IMLMM IHLMM ILMMM IMMMM IHMMM ILHMM IMHMM IHHMM
 ILLHM IMLHM IHLHM ILMHM IMMHM IHMHM ILHHM IMHHM IHHHM
 ILLLH IMLLH IHLLH ILMLH IMMLH IHMLH ILHLH IMHLH IHHLH
 ILLMH IMLMH IHLMH ILMMH IMMMH IHMMH ILHMH IMHMH IHHMH
 ILLHH IMLHH IHLHH ILMHH IMMHH IHMHH ILHHH IMHHH IHHHH
 DLOW_LOZ DMEW_LOZ DHIW_LOZ DLOW_MEZ DMEW_MEZ DHIW_MEZ
 DLOW_HIZ DMEW_HIZ DHIW_HIZ
 TLLLL TMLLL THLLL TLMLL TMMLL THMLL TLHLL TMHLL THHLL
 TLLML TMLML THLML TLMML TMMML THMML TLHML TMHML THHML
 TLLHL TMLHL THLHL TLMHL TMMHL THMHL TLHHL TMHHL THHHL
 TLLLM TMLLM THLLM TLMLM TMMLM THMLM TLHLM TMHLM THHLM
 TLLMM TMLMM THLMM TLMMM TMMMM THMMM TLHMM TMHMM THHMM
 TLLHM TMLHM THLHM TLMHM TMMHM THMHM TLHHM TMHHM THHHM
 TLLLH TMLLH THLLH TLMLH TMMLH THMLH TLHLH TMHLH THHLH
 TLLMH TMLMH THLMH TLMMH TMMMH THMMH TLHMH TMHMH THHMH
 TLLHH TMLHH THLHH TLMHH TMMHH THMHH TLHHH TMHHH THHHH);
LOW_W = -1;
 MED_W = 0;
 HIGH_W = 1;
 LOW_Z = -1;
 MED_Z = 0;
 HIGH_Z = 1;
 LOW_V = -1;
 MED_V = 0;
 HIGH_V = 1;
 LOW_Q = -1;
 MED_Q = 0;
 HIGH_Q = 1;
ILLLL = a1*b1 + a4*b1*LOW_W + a5*b1*LOW_Z + a1*b4*LOW_V +
 a4*b4*LOW_W*LOW_V + a5*b4*LOW_Z*LOW_V + a1*b5*LOW_Q +
 a4*b5*LOW_W*LOW_Q + a5*b5*LOW_Z*LOW_Q + a1*b7*LOW_V*LOW_Q +
 a4*b7*LOW_W*LOW_V*LOW_Q + a5*b7*LOW_Z*LOW_V*LOW_Q;
PLOT(PLLLL PMLLL PHLLL PLMLL PMMLL PHMLL PLHLL PMHLL PHHLL
 PLLML PMLML PHLML PLMML PMMML PHMML PLHML PMHML PHHML
 PLLHL PMLHL PHLHL PLMHL PMMHL PHMHL PLHHL PMHHL PHHHL
 PLLLM PMLLM PHLLM PLMLM PMMLM PHMLM PLHLM PMHLM PHHLM
 PLLMM PMLMM PHLMM PLMMM PMMMM PHMMM PLHMM PMHMM PHHMM
 PLLHM PMLHM PHLHM PLMHM PMMHM PHMHM PLHHM PMHHM PHHHM
 PLLLH PMLLH PHLLH PLMLH PMMLH PHMLH PLHLH PMHLH PHHLH
 PLLMH PMLMH PHLMH PLMMH PMMMH PHMMH PLHMH PMHMH PHHMH
 PLLHH PMLHH PHLHH PLMHH PMMHH PHMHH PLHHH PMHHH PHHHH);
LOOP(XVAL,-3,3,0.1);
PLLLL = ILLLL*XVAL;

代码解读11

USEVARIABLES = X1 X2 X3 X4 M1 M2 M3 M4
W1 W2 W3 W4 Z1 Z2 Z3 Z4 V1 V2 V3 V4 Q1 Q2 Q3 Q4
Y1 Y2 Y3 Y4;
ANALYSIS:
 TYPE = GENERAL RANDOM;
 ESTIMATOR = ML;
 ALGORITHM = INTEGRATION;
MODEL:
 X BY X1 X2 X3 X4;
 M BY M1 M2 M3 M4;
 W BY W1* W2 W3 W4;
 Z BY Z1* Z2 Z3 Z4;
 V BY V1* V2 V3 V4;
 Q BY Q1* Q2 Q3 Q4;
 Y BY Y1 Y2 Y3 Y4;
  W@1;  Z@1;  V@1;  Q@1;
MV | M XWITH V;
 MQ | M XWITH Q;
 XW | X XWITH W;
 XZ | X XWITH Z;
 VQ | V XWITH Q;
 MVQ | M XWITH VQ;
Y ON M (b1);
 Y ON V (b2);
 Y ON Q (b3);
 Y ON MV (b4);
 Y ON MQ (b5);
 Y ON VQ (b6);
 Y ON MVQ (b7);
 Y ON X (cdash1);
 Y ON W (cdash2);
 Y ON Z (cdash3);
 Y ON XW (cdash4);
 Y ON XZ (cdash5);
 M ON X (a1);
 M ON W (a2);
 M ON Z (a3);
 M ON XW (a4);
 M ON XZ (a5);
MODEL CONSTRAINT:
 NEW(LOW_W MED_W HIGH_W LOW_Z MED_Z HIGH_Z LOW_V MED_V HIGH_V LOW_Q MED_Q HIGH_Q
 ILLLL IMLLL IHLLL ILMLL IMMLL IHMLL ILHLL IMHLL IHHLL
 ILLML IMLML IHLML ILMML IMMML IHMML ILHML IMHML IHHML
 ILLHL IMLHL IHLHL ILMHL IMMHL IHMHL ILHHL IMHHL IHHHL
 ILLLM IMLLM IHLLM ILMLM IMMLM IHMLM ILHLM IMHLM IHHLM
 ILLMM IMLMM IHLMM ILMMM IMMMM IHMMM ILHMM IMHMM IHHMM
 ILLHM IMLHM IHLHM ILMHM IMMHM IHMHM ILHHM IMHHM IHHHM
 ILLLH IMLLH IHLLH ILMLH IMMLH IHMLH ILHLH IMHLH IHHLH
 ILLMH IMLMH IHLMH ILMMH IMMMH IHMMH ILHMH IMHMH IHHMH
 ILLHH IMLHH IHLHH ILMHH IMMHH IHMHH ILHHH IMHHH IHHHH
 DLOW_LOZ DMEW_LOZ DHIW_LOZ DLOW_MEZ DMEW_MEZ DHIW_MEZ
 DLOW_HIZ DMEW_HIZ DHIW_HIZ
 TLLLL TMLLL THLLL TLMLL TMMLL THMLL TLHLL TMHLL THHLL
 TLLML TMLML THLML TLMML TMMML THMML TLHML TMHML THHML
 TLLHL TMLHL THLHL TLMHL TMMHL THMHL TLHHL TMHHL THHHL
 TLLLM TMLLM THLLM TLMLM TMMLM THMLM TLHLM TMHLM THHLM
 TLLMM TMLMM THLMM TLMMM TMMMM THMMM TLHMM TMHMM THHMM
 TLLHM TMLHM THLHM TLMHM TMMHM THMHM TLHHM TMHHM THHHM
 TLLLH TMLLH THLLH TLMLH TMMLH THMLH TLHLH TMHLH THHLH
 TLLMH TMLMH THLMH TLMMH TMMMH THMMH TLHMH TMHMH THHMH
 TLLHH TMLHH THLHH TLMHH TMMHH THMHH TLHHH TMHHH THHHH);
LOW_W = -1;
 MED_W = 0;
 HIGH_W = 1;
 LOW_Z = -1;
 MED_Z = 0;
 HIGH_Z = 1;
 LOW_V = -1;
 MED_V = 0;
 HIGH_V = 1;
 LOW_Q = -1;
 MED_Q = 0;
 HIGH_Q = 1;
ILLLL = a1*b1 + a4*b1*LOW_W + a5*b1*LOW_Z + a1*b4*LOW_V +
 a4*b4*LOW_W*LOW_V + a5*b4*LOW_Z*LOW_V + a1*b5*LOW_Q +
 a4*b5*LOW_W*LOW_Q + a5*b5*LOW_Z*LOW_Q + a1*b7*LOW_V*LOW_Q +
 a4*b7*LOW_W*LOW_V*LOW_Q + a5*b7*LOW_Z*LOW_V*LOW_Q;
PLOT(PLLLL PMLLL PHLLL PLMLL PMMLL PHMLL PLHLL PMHLL PHHLL
 PLLML PMLML PHLML PLMML PMMML PHMML PLHML PMHML PHHML
 PLLHL PMLHL PHLHL PLMHL PMMHL PHMHL PLHHL PMHHL PHHHL
 PLLLM PMLLM PHLLM PLMLM PMMLM PHMLM PLHLM PMHLM PHHLM
 PLLMM PMLMM PHLMM PLMMM PMMMM PHMMM PLHMM PMHMM PHHMM
 PLLHM PMLHM PHLHM PLMHM PMMHM PHMHM PLHHM PMHHM PHHHM
 PLLLH PMLLH PHLLH PLMLH PMMLH PHMLH PLHLH PMHLH PHHLH
 PLLMH PMLMH PHLMH PLMMH PMMMH PHMMH PLHMH PMHMH PHHMH
 PLLHH PMLHH PHLHH PLMHH PMMHH PHMHH PLHHH PMHHH PHHHH);
LOOP(XVAL,-3,3,0.1);
PLLLL = ILLLL*XVAL;
OUTPUT:
 CINT;

资源汇总

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