从网上学习了大神分享的mplus有调节的中介效应命令
但是点击运行显示错误
错误语句提示如下:
*** ERROR in MODEL CONSTRAINT command
A parameter label or the constant 0 must appear on the left-hand side of a MODEL CONSTRAINT
statement. A parameter label must be declared in the MODEL command or with the NEW or PLOT
options in MODEL CONSTRAINT before it can be used. Problem with: DIR_LOW
请教各位大神,这是什么错误呀,要怎么解决呢(实在是没找到这方面的问题答案)
谢谢🙏祝各位大神学术之路节节高升!
大神的命令如下:
VARIABLE: NAMES ARE x m1 w v1 v2 v3 y;
! 给数据中变量命名
USEVARIABLES = X M1 v1 v2 v3 Y xm1;
DEFINE: Xm1 = X*m1;
ANALYSIS:
TYPE = GENERAL;
ESTIMATOR = ML;
BOOTSTRAP = 2000;
MODEL:
m by v1 v2 v3;
[Y] (b0);
Y ON M (b1);
Y ON X (cdash1);
Y ON m1 (cdash2);
Y ON Xm1 (cdash3);
[M] (a0);
M ON X (a1);
MODEL CONSTRAINT:
NEW(LOW_W MED_W HIGH_W a1b1 DIR_LO DIR_MED DIR_HI TOT_LO TOT_MED TOT_HI);
LOW_W = 2.6;
MED_W = 4.7;
HIGH_W = 6.7;
A1B1 = a1*b1;
DIR_LOW = cdash1 + cdash3*LOW_W;
DIR_MED = cdash1 + cdash3*MED_W;
DIR_HIGH = cdash1 + cdash3*HIGH_W;
TOT_LOW = DIR_LOW + A1B1;
TOT_MED = DIR_MED + A1B1;
TOT_HIGH = DIR_HIGH + A1B1;
PLOT(LOMOD MEDMOD HIMOD);
LOOP(XVAL,1,5,0.1);
LOMOD = (b0 + a0*b1 + cdash2*LOW_W) + TOT_LOW*XVAL;
MEDMOD = (b0 + a0*b1 + cdash2*MED_W) + TOT_MED*XVAL;
HIMOD = (b0 + a0*b1 + cdash2*HIGH_W)+ TOT_HIGH*XVAL;
PLOT:
TYPE = plot2;
OUTPUT:
STAND CINT(bcbootstrap);