Command Problem in Mplus PreviousNext
Mplus Discussion > Structural Equation Modeling >
Message/Author
 Sehrish Shahid posted on Tuesday, April 17, 2018 - 10:52 pm
I have a model where IV and mediator are collected on individual level but I want IV to aggregate at work unit level. My DV is where manager rated the performance of 61 teams. If I aggregate IV to workunit level and analyse its relationship with individual level mediator and team performance. How can I write my command in within and between level in SEM? Also do I need to aggregate mediators too?
Data on IV and mediators given by employees having 358 obs.
Data on DV given by managers on performance of 61 teams.

My IV is TF1-TF20
Mediators is T1-T10
DV is TP

Control variable are EmployeeAge Employeegender Employeeeducation Employeetenure
 Bengt O. Muthen posted on Wednesday, April 18, 2018 - 3:58 pm
On Within you have

M on IV;

On Between you have

DV on Mmean;
Mmean on IVmean;

where those ~mean variables are obtained using the Cluster_Mean option.
 Sehrish Shahid posted on Wednesday, April 18, 2018 - 10:24 pm
Hi I tried to write command but got the following error message.

Variable:
Usevariable are WU TF1-TF20
AL1-AL16 SL1-SL14 T1-T10 Psy1 -Psy24 Ov1-Ov15 IR1-IR7 OCBI1-OCBI7 OCBO1-OCBO7TFmean SLmean ALmean Tmean PSYMean OVmean;
Cluster=WU;
Within are TF1-TF20
AL1-AL16 SL1-SL14 T1-T10 Psy1-Psy24 Ov1-Ov15;
Between are TFmean SLmean ALmean Tmean PSYMean OVmean IR1-IR7 OCBI1-OCBI7 OCBO1-OCBO7;
Define:TFmean=CLUSTER_Mean(TF1-TF20);SLmean=CLUSTER_Mean(SL1-SL14);ALmean=CLUSTER_Mean(AL1-AL16);Tmean=CLUSTER_Mean(T1-T10);PSYMean=CLUSTER_Mean(Psy1Psy24);OVmean=CLUSTER_Mean(Ov1-Ov15);
Analysis:
Type=TWOLEVEL RANDOM;
Model: %Within%
TF by TF1-TF20;AL by AL1-AL16;SL by SL1-SL14;T by T1-T10;Psy by Psy1-Psy24;OV by Ov1-Ov15;Psy on TF;OV on TF;Psy on Al;OV on Al;Psy on Sl;OV on Sl;T on Psy;T on OV;
%Between%
TP by IR1-IR7 OCBI1-OCBI7 OCBO1-OCBO7;
TP on PSYMean;TP on OVmean;TP on Tmean;PSYMean on TFmean;
OVmean on TFmean;PSYMean on SLmean;
OVmean on SLmean;PSYMean on ALmean;
OVmean on ALmean;Tmean on PSYMean;
Tmean on OVmean;TP on TFmean;TP on SLmean; TP on Almean;
OUTPUT:
SAMPSTAT STDYX;
 Sehrish Shahid posted on Wednesday, April 18, 2018 - 10:25 pm
*** ERROR in DEFINE command
Unknown variable in CLUSTER_MEAN function: TF1-TF20 *** ERROR in DEFINE command Unknown variable in CLUSTER_MEAN function: SL1-SL14*** ERROR in DEFINE command Unknown variable in CLUSTER_MEAN function: AL1-AL16*** ERROR in DEFINE command Unknown variable in CLUSTER_MEAN function: T1-T10*** ERROR in DEFINE command Unknown variable in CLUSTER_MEAN function: PSY1-PSY24*** ERROR in DEFINE command Unknown variable in CLUSTER_MEAN function: OV1-OV15
 Bengt O. Muthen posted on Thursday, April 19, 2018 - 4:19 pm
Send your output to Support along with your license number.

We ask that postings be limited to one window.
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: