I am currently at the beginning stages of learning Mplus (version 4.1 [a friend is letting me use his computer while he is on holidays])to analyze some data. I am testing a path analysis and want to test for moderation. I see on page 481 in the manual, that I should use the define command. If I were doing a latent variable analysis, I would have the following:
Analysis: Type = random; Algorithm =integration. (1)Is this what I should type for my model?
(2)Do I simply muliply my two variables to create the interaction?
(3)I have 5 possible moderators. Do I test five different models or one model with the five?
Any help is appreciated. I am a PhD student and am just learning this program. Thanks.
If the interaction is between two observed variables, you would multiply them together. If one of the variables is a latent variable, you would use the XWITH command. See the user's guide on the website for further information.
As you see there is an interaction term in Eq.2 that contains y1. When I substitute (Eq.1) in (Eq.2), x2 is correlated with the error term, which causes an endogeneity problem. I found a friend of mine who has Mplus program. The program does not seem to support a model I suggested. Being less familiar with SEM literature, I haven't been able to find a correct way of estimating beta22. 2SLS wouldn't work either due to non-linearity. Could someone help me on this issue?
I don't think that there are any problems in estimating beta22. In fact you don't need equation 1 at all. You can simply estimate equation 2 directly and ML will give you the consistent estimates.
If you choose to substitute Y1 in the second equation and then estimate beta22 from the combined equation you can still get consistent estimates if you specify that [E with X2] is a free parameter, but you need to specify the correct parameter constraint for this parameter with Mplus Model Constraint which will also involve gamma11.
Maybe I am asking a totally trivial question, but it is not immediately clear to me how the Model Constraint command can resolve the endogeneity problem that becomes visible when I substitute (Eq.1) into (Eq.2). Doesn't this command just specify relationship among parameters?
You can specify the correlation between the covariate and the residual as part of model constraint, but again ... you should not substitute (Eq.1) into (Eq.2) for the sole purpose of obtaining unbiased parameter estimates of that model.
See Example 5.23 in the user's guide for how to use model constraints to build a model with varying variance (Y2 variance) and varying correlation (Y2 with X2).
db40 posted on Wednesday, July 09, 2014 - 11:33 am
Is there any notes on the Mplus website that details how to do an interaction in mplus?
All I am trying to do is a very simple interaction like below. I dont know why but I get the feeling this is wrong.
Tamara Kang posted on Thursday, April 20, 2017 - 10:09 pm
How would you test an interaction between two dichotomous variables (each coded as 0 or 1) on one dependent variable (i.e., count variable)? Would you multiple them in the define command (e.g., DEFINE: x1=time*resist), or use a different command? I tried using the XWITH command, but I received an error that the XWITH command is not available with TWOLEVEL RANDOM. Or would I need to probe the interaction using quantpsy.org or another program?
Thank you very much. The video was really helpful. I have a follow-up question regarding these analyses.
To be more concrete, I want to test the effect of women's social status (x) on women's attitude towards female circumcision (y) on their final decision whether they let their daughter be medically circumcized or not (z). Moreover, we hypothesize that the prevalence rate of circumcision within the women's region (m) moderates the association between y and z.
We have circumcision prevalence rates for all regions of Egypt.
(1) Would it be necessary to do multilevel SEM? (2) Or could we do regular SEM in which each woman of our dataset gets their own 'individual' prevalence rate (i.e. the rate of the region where they live) and include it as a continuous moderator in our model? (3) If (2) would be possible, do we need to control for the fact that the number of respondents differ between regions? If so, how would we do that?
You want to take into account that there is possibly variation across regions in attitudes (y) and in tendency to let their daughter be circumcised (z). Plus that y influences z differently in different regions (the moderation). This can be done using multilevel SEM - at least if you have many (say > 30) regions and you view region as a random mode (random draw from a larger population of regions) as opposed to a fixed mode (which would be handled by multiple-group analysis).
For multilevel modeling you would have a random intercept on level 1 (woman) for y and for z which varies on level 2 (region). And you would have a random slope for z regressed on y so that the influence of y on z is moderated by region as you say.
It would be easier for others to understand this quicker if your notation is the standard for mediation. So instead of saying as you do
x -> y -> z
you would say:
x -> m -> y
where x = woman's soc status m = attitude y = daughter decision
Chang Liu posted on Friday, June 05, 2020 - 5:56 am
For the moderated mediation, 1 mediator, 1 moderator of the mediator - DV path only, can I create the interaction term (mediator * moderator) before the analysis (instead of using Mplus DEFINE function)? This way, will Mplus know that is the interaction term (mediator * moderator)?