Two Level Path Model for Mediation An... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Feng Liu posted on Friday, December 11, 2015 - 3:55 pm
I am working on a 2-level path analysis to study how school level engagement score mediate the relationship between school program quality (tx = 1(high) or 0 (low)) and student level outcomes including test scores and absence. We theorized some student level variables such as grade level, pretest score, etc. and school level variables such as school rating, school type, etc. could affect outcomes. See the model below:

data:
file is Mediation.dat;
variable:
names are ...;
missing are all (-99);
within = AbsRate_2013 Z_M_13 GRADE;
between = Rating Type engage tx;
cluster is CAMPUS;
analysis:
type=twolevel;
model:
%within%
Z_M_14 on AbsRate_2013 GRADE Z_M_13;
Abs on AbsRate_2013 GRADE;

%between%
Z_M_14 on Rating Type engage tx;
Abs on Rating Type engage tx;
engage on Rating Type tx;

output:
tech1 tech8;

I assume the mediation effect of school engagement score (engage) between school program quality (tx) and student math score (Z_M_14) would be the effect of engage on Z_M_14 * the effect of tx on engage at the between level. Any input on whether the model is correct and my understanding of the mediation effect is correct would be greatly appreciated!

Thank you so much,
Feng
 Bengt O. Muthen posted on Saturday, December 12, 2015 - 4:45 pm
This looks correct.
 Feng Liu posted on Saturday, December 12, 2015 - 7:17 pm
Thanks so much, Dr. Muthen!

Best regards,
Feng
 Feng Liu posted on Tuesday, December 22, 2015 - 1:03 pm
Another question I have is that whether I can add the interaction terms in the two level path analysis model. For example, if I theorize the interaction between school rating and school type can affect the engagement score, how can I add that interaction term? Should I just add the interaction term in the command like the following?

engage on Rating Type Rating*Type tx;

Thanks so much!

Best,
Feng
 Linda K. Muthen posted on Tuesday, December 22, 2015 - 3:55 pm
You create an interaction variable in the DEFINE command and put it at the end of the USEVARIABLES list. Use that variable in the ON statement.
 Feng Liu posted on Wednesday, December 23, 2015 - 1:07 pm
Thanks so much, Dr. Muthen!

Best regards,
Feng
 Feng Liu posted on Wednesday, December 23, 2015 - 3:57 pm
Dr. Muthen, I supposed I need to define the interaction term before the variable command and then put it at the end of the USEVARIABLES list. Please let me know if the following codes are correct. Thanks!

data:
file is Mediation.dat;

define: Rating_Type=Rating*Type;
variable:
names are ...;
missing are all (-99);
USEVARIABLES are AbsRate_2013 Z_M_13 GRADE Rating Type engage tx CAMPUS Rating_Type;
within = AbsRate_2013 Z_M_13 GRADE;
between = Rating Type engage tx Rating_Type;
cluster is CAMPUS;

analysis:
type=twolevel;
model:
%within%
Z_M_14 on AbsRate_2013 GRADE Z_M_13;
Abs on AbsRate_2013 GRADE;

%between%
Z_M_14 on Rating Type engage tx;
Abs on Rating Type engage tx;
engage on Rating Type tx Rating_Type;

output:
tech1 tech8;
 Bengt O. Muthen posted on Thursday, December 24, 2015 - 6:16 pm
Looks ok. You can put the Define command anywhere.
 Feng Liu posted on Monday, December 28, 2015 - 9:22 am
Thanks, Dr. Muthen!

Best regards,
Feng
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: