楼主: 奔跑的靡靡
5876 5

[统计软件] MPLUS跑不出来求助 A parameter label or the constant 0 must appear on the lef [推广有奖]

  • 0关注
  • 0粉丝

小学生

21%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
43 点
帖子
2
精华
0
在线时间
8 小时
注册时间
2017-6-23
最后登录
2019-8-16

楼主
奔跑的靡靡 发表于 2019-7-18 16:58:07 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
DATA:
    FILE IS D:\2019工作\最终大论文分析数据.dat; VARIABLE:
    NAMES ARE M W Z X Y;
  ! Predictor variable - X
  ! Mediator variable(s) - M
  ! Moderator variable(s) - W, Z
  ! Outcome variable - Y
  USEVARIABLES = X M W Z Y XW XZ;
  ! Create interaction terms
  ! Note that 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 M (b1);
  Y ON X (cdash);
  [M] (a0);
  M ON X (a1);
  M ON W (a2);
  M ON Z (a3);
  M ON XW (a4);
  M ON XZ (a5);
  ! Use model constraint subcommand to test conditional indirect effects
  ! You need to pick low, medium and high moderator values for W,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 conditional indirect and total effects used below:
  ! MEV_LOQ = medium value of V and low value of Q, etc.

  MODEL CONSTRAINT:
  NEW(LOW_W MED_W HIGH_W LOW_Z MED_Z HIGH_Z
  ILOW_LOZ IMEW_LOZ IHIW_LOZ ILOW_MEZ IMEW_MEZ IHIW_MEZ
  ILOW_HIZ IMEW_HIZ IHIW_HIZ
  TLOW_LOZ TMEW_LOZ THIW_LOZ TLOW_MEZ TMEW_MEZ THIW_MEZ
  TLOW_HIZ TMEW_HIZ THIW_HIZ);

  LOW_W = 2.90; ! replace #LOWW in the code with your chosen low value of W
  MED_W = 3.87; ! replace #MEDW in the code with your chosen medium value of W
  HIGH_W = 4.85; ! replace #HIGHW in the code with your chosen high value of W
  LOW_Z = 2.56; ! replace #LOWZ in the code with your chosen low value of Z
  MED_Z = 3.56; ! replace #MEDZ in the code with your chosen medium value of Z
  HIGH_Z = 4.55; ! replace #HIGHZ in the code with your chosen high value of Z
  ! Calc conditional indirect effects for each combination of moderator values

  ILOW_LOZ = a1*b1 + a4*b1*LOW_W + a5*b1*LOW_Z;
  IMEW_LOZ = a1*b1 + a4*b1*MED_W + a5*b1*LOW_Z;
  IHIW_LOZ = a1*b1 + a4*b1*HIGH_W + a5*b1*LOW_Z;
  ILOW_MEZ = a1*b1 + a4*b1*LOW_W + a5*b1*MED_Z;
  IMEW_MEZ = a1*b1 + a4*b1*MED_W + a5*b1*MED_Z;
  IHIW_MEZ = a1*b1 + a4*b1*HIGH_W + a5*b1*MED_Z;
  ILOW_HIZ = a1*b1 + a4*b1*LOW_W + a5*b1*HIGH_Z;
  IMEW_HIZ = a1*b1 + a4*b1*MED_W + a5*b1*HIGH_Z;
  IHIW_HIZ = a1*b1 + a4*b1*HIGH_W + a5*b1*HIGH_Z;
  ! Calc conditional total effects for each combination of moderator values

  TLOW_LOZ = ILOW_LOZ + cdash;
  TMEW_LOZ = IMEW_LOZ + cdash;
  THIW_LOZ = IHIW_LOZ + cdash;
  TLOW_MEZ = ILOW_MEZ + cdash;
  TMEW_MEZ = IMEW_MEZ + cdash;
  THIW_MEZ = IHIW_MEZ + cdash;
  TLOW_HIZ = ILOW_HIZ + cdash;
  TMEW_HIZ = IMEW_HIZ + cdash;
  THIW_HIZ = IHIW_HIZ + cdash;
  ! Use loop plot to plot conditional indirect effect of X on Y for each combination of low,
  ! Could be edited to show conditional direct or conditional total effects instead
  ! 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,6,0.1);
  PLOW_LOZ = ILOW_LOZ*XVAL;
  PMEW_LOZ = IMEW_LOZ*XVAL;
  PHIW_LOZ = IHIW_LOZ*XVAL;

  PLOW_MEZ = ILOW_MEZ*XVAL;
  PMEW_MEZ = IMEW_MEZ*XVAL;
  PHIW_MEZ = IHIW_MEZ*XVAL;

  PLOW_HIZ = ILOW_HIZ*XVAL;
  PMEW_HIZ = IMEW_HIZ*XVAL;
  PHIW_HIZ = IHIW_HIZ*XVAL;

  PLOT:
  TYPE = plot2;

  OUTPUT:
  STAND CINT(bcbootstrap);

*** ERROR in MODEL CONSTRAINT command
  A parameter label or the constant 0 must appear on the left-hand side
  of a MODEL CONSTRAINT statement.  Problem with the following:
  PHIW_HIZ) =



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Parameter constant paramete appear Mplus

沙发
奔跑的靡靡 发表于 2019-7-18 17:20:33
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.  Problem with the following: PHIW_HIZ) =
求助各位大神,这是错在哪里了,应该怎么修改

藤椅
ddy0558 发表于 2019-12-15 19:43:21
楼主这个问题解决了嘛,我也有同样的困扰

板凳
chenqy56 发表于 2020-11-9 21:34:42
我也出现了同样的问题,最后是发现有一个括号用的是中文状态下的,所以跑不出来

报纸
HZX1122 学生认证  发表于 2021-12-27 18:13:45
奔跑的靡靡 发表于 2019-7-18 17:20
mplus报错 ERROR in MODEL CONSTRAINT command A parameter label or the constant 0 must appear on the l ...
请问你现在问题解决吗

地板
1-4-7-1-4-7 发表于 2023-11-9 15:01:06
这种情况先查拼写错误。你看看有没有把o0,li1这些小写很容易混淆的东西弄混,我就是找了一大圈最后发现是这个原因来的。

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
jg-xs1
拉您进交流群
GMT+8, 2025-12-31 22:06