Message/Author 

Karen Chan posted on Sunday, September 26, 2010  8:17 pm



hi all, i'm wondering if i could study the relationship between some variables with sem. Here are the variables: Independent variable  X1 (categorical, 2 levels, experimentally manipulated, withinsubject), X2 (categorical, betweensubject, moderator variable), X3/Y1 (continuous, withinsubject, also a dependent variable) Dependent variable  Y1/X3 (continuous, withinsubject, also an independent variable), Y2 (continuous, withinsubject) The paths that i want to include are the following: X1>Y1 X3>Y2 X2 has a moderating effect on X1>Y1 How can I do that using Mplus and how might the input file look like? I'm using the .dat file. 


WITHIN = x1 x3 y1 y3; BETWEEN = x2; MODEL: %WITHIN% s  y1 ON x1; y2 ON x3; %BETWEEN% s ON x2; 

Amy Walzer posted on Saturday, February 22, 2014  8:42 pm



Hello all, I am having some difficulty determining the syntax for the model I need to test. I believe it is a moderated mediation. Here are my variables:  Gender  IV, Experimentally manipulated, categorical (2levels), between subjects  Comp  Mediator between Gender and Comp, continuous  Goal Diff  DV, continuous  Sexism  Moderator of Comp on Gender, continuous, between subjects  Goal Type  Moderator of Goal Diff on Comp, experimentally manipulated, categorical (2 levels; learning goal vs. performance goal), within subjects I want to know:  Does Comp mediate the relationship between Gender and Goal Diff?  Does Sexism moderate the relationship between Gender and Comp?  Does Goal Type (withinsubjects) moderate the relationship between Comp and Goal Diff? What would the input look like for this model? Given that Goal Type is a withinsubjects variable, do I need to have two lines of data per participant, one for each Goal Type (learning goal and performance goal)? What analysis type would this be? I know this is a lot to ask so any help people could provide would be greatly appreciated! Warm regards, Amy 


Example 3.18 is moderated mediation. See if that helps you. 

Amy Walzer posted on Saturday, April 19, 2014  11:20 am



Hello, Looking at the example was very helpful to me. Thank you! I am still having difficulty figuring out how to deal with my within subjects manipulated variable (X2). I want to see if it moderates the relationship between a latent continuous variable (X1) and an observed dependent variable (Y). Specifically, I assume I need two lines of data per participant (one for each level of X1). Is this correct? Also, what might this input look like? Thank you for your help, Amy 


You can create an interaction between a latent variable and an observed variable using the XWITH option. 

Amy Walzer posted on Tuesday, May 06, 2014  4:59 pm



I have figured that part out but I am now wondering if my data is set up correctly. I have a within subjects variable that was experimentally manipulated (2 levels). Does this mean I need two lines of data per person? 


No. Your X2 variable has 2 values. Some subjects (lines in your data) have one of the 2 levels some have the other. 

Amy Walzer posted on Tuesday, May 06, 2014  7:38 pm



So I may have been a little unclear in my previous post. I am interested in whether X1 (a continuous, latent variable) is related to X2/Y1 (a withinsubjects, 2level, manipulated variable, also a dependent variable). I also want to know if X2 moderates the relationship between X1 and Y1. Given that all of my participants completed the measures for both levels of the X2/Y1. I'm not sure I understand how I would not need two lines of data per person. I really appreciate all of your help with this! 


It sounds like you would need one column for each condition. If each person completed each condition, I think they would have a value for each condition and therefore each condition would represent a variable. 

Amy Walzer posted on Wednesday, May 07, 2014  8:03 pm



That makes sense but with the withinsubjects variable represented in two columns I'm not sure how I would test the withinsubjects variable (X2/Y1) as a moderator between X1 (continuous, latent) and Y1. Can you provide any insight on this? 


See Example 3.18. This shows moderated mediation. 

Back to top 