Error Undefined variable used in tran... PreviousNext
Mplus Discussion > Structural Equation Modeling >
Message/Author
 janelle wells posted on Thursday, September 06, 2012 - 8:25 am
Linda,
I continue to receive this error message Undefined variable used in transfromation: ACOM. I am using Preacher's mplus code for a moderated mediator and I've defined my new variable (AcomXJemb), listed at the end of my USERVARIABLES list, but I continue to receive the error.

*** ERROR
Undefined variable used in transformation:
ACOM

Here is an abbreviated syntax:

USEVARIABLE ARE
(a list of all my items plus the interaction variable listed below)
AcomxJemb;
Missing = all(-99);

DEFINE:
AcomxJemb = Acom*jemb;

ANALYSIS: bootstrap = 5000;

model:
Factor1 by TransF1 TransF2 TransF6 TransF9 TransF11
TransF12 TransF13 TransF14 TransF16;
Jemb by JembL58 JembL60 JembL61 JembL62;
Acom by AcomL64 AcomL66 AcomL68;
TurnO by TurnOL69 TurnOL71 TurnOL72 TurnOL73;
JSB by JSBL75 JSBL76 JSBL77 JSBL78 JSBL79;

JSB on Acom (b1)
Factor1
Jemb
AcomxJemb (b3);
Acom on Factor1 (a1);
Jemb with Acom;
AcomXJemb with Acom;

MODEL CONSTRAINT:
new (ind wmodval);
wmodval = 3.75;
ind= a1*(b1+b3*wmodval);

output:
cinterval (bcbootstrap);


Any assistance you could offer, would be great.
Thanks,
Janelle
 Linda K. Muthen posted on Thursday, September 06, 2012 - 10:09 am
Please send your output and license number to support@statmodel.com.
 Minji Yang posted on Tuesday, April 22, 2014 - 2:12 pm
Hello, I am trying to run a moderation and used the DEFINE command to define the interactions, included them after the original variables in the USEVARIABLES list as well as included them in the MODEL command to regress onto the dependent variable. However, I get the ERROR: Undefined variable used in transformation.

I would love to get some assistance on this.

Thank you,
Minji
 Linda K. Muthen posted on Tuesday, April 22, 2014 - 5:21 pm
Please send the output and your license number to support@statmodel.com.
 Annette Ponnock posted on Monday, May 25, 2020 - 8:42 pm
I am having the same issue. Here is my code:

USEVAR = insp alert enthus deter proud inter supp amuse valu comp peace fulf happy
confi empow apprec moved afra upset nerv scared distress angry depress discour bored
frust lone sad exclud exhaus dires overwh press frpl cong_grp d1 d2 d3;
MISSING = ALL (-99);
CATEGORICAL = cong_grp

DEFINE: IF cong_grp EQ 2 THEN d1 = 1 d2 = 0 d3 = 0;
IF cong_grp EQ 3 THEN d1 = 0 d2 = 1 d3 = 0;
IF cong_grp EQ 4 THEN d1 = 0 d2 = 0 d3 = 1;

!analysis: estimator=mlr; process=3;


MODEL:
! meausrement model

PA by insp* alert enthus deter proud inter supp amuse valu comp peace fulf happy
confi empow apprec moved;
PA@1;
NA by afra* upset nerv scared distress angry depress discour bored
frust lone sad exclud exhaus dires overwh press;
NA@1;

! predicting model

PA on d1 d2 d3;
NA on d1 d2 d3;
 Bengt O. Muthen posted on Tuesday, May 26, 2020 - 10:37 am
Usually, this is due to a simple user mistake but we need to see your full output to be able to say - send to Support along with your license number.
 Arianna White posted on Tuesday, July 14, 2020 - 6:53 pm
Hi there - I'm having the same problem. Error message says: Undefined variable used in transformation: POSVAL. This error message only appeared in my syntax when I tried to run plots. PosVal was not a problem when I ran the path model (mediation model with 2nd order latent variables and interactions).

Here's an abbreviated syntax. ab is in the usevariables list, and ab is named in the model section: ab (gamma2)

DEFINE: ab = PosVal*SSE;

In model constraint:

!Plot for moderated indirect effect
!PosVal-> PA -> CogEng

LOOP(Inter1,-2,2,0.1);
PLOT(indirect);
indirect = f3*(a3+gamma2*Inter1);
PLOT: TYPE = PLOT2;
 Bengt O. Muthen posted on Wednesday, July 15, 2020 - 4:39 pm
Sounds like your Posval variable is not on your Names or Usev lists. If this doesn't help, then:

We need to see your full output to diagnose this - send to Support along with your license number.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: