You have input in the FAQ Latent variable interaction LOOP plot.
Moderation modeling with latent variables and dummy Xs may be more easily done via multiple-group modeling (3 groups in your case) where key parameters vary across the groups. But you can use XWITH also for interactions between latents and dummies.
Modeling the moderation between M and Y requires extra care as shown in Model 1 of Preacher, Rucker, Hayes (2007) in MBR.
From Preacher, Rucker, Hayes (2007), I want Model 2 and Model 3. Previously, I used "Define: MV = M * V with continuous observed variables. Now "Define" does not work before "Model" since M and V are latent variables created by "BY".
I can only get XWITH to work for "Type = Random; Algorithm = Integration;", no bootstrapping or fit stats. Is there a better alternative? I appreciate your assistance.
MODEL: Variety BY Variety1 Variety2 Variety3; !(M) Expertis BY Chooser1 Chooser2 Chooser3; !(W) SelfDet BY SelfDet1 SelfDet2 SelfDet3 SelfDet4; PrefID BY Manchk1 ManChk2 ManChk3; Inter| Expertis XWITH Variety; !(M * W) Variety ON Cat_0 Cat_U (a1); !(a1 or M on X1 and X2) Satisf1 ON Cat_0 Cat_U !(c' or Y on X! and X2) Variety (b1) Expertis !(b2) Inter (b3) SelfDet PrefID; !Expertis WITH Variety; !Inter WITH Variety; MODEL CONSTRAINT: PLOT(Indirect); LOOP(Expert,-2,2,0.1); Indirect=a1*(b1+b3*Expert); !(Y = a1(b1+b3W)) !MODEL INDIRECT: !Cat_0 IND Variety Satisf1; !Cat_U IND Variety Satisf1;
I see that the User Guide explains that. I was hoping for an alternative.
I have a working model, output and plots but I see that the model fit statistics are limited with MLR.
The plot of indirect effect against values of the moderator shows confidence intervals, that always include 0 so I can interpret that as meaning that the the null H of "zero indirect effect regardless of the level of the moderator" cannot be rejected. Still I was wondering if you could direct me to a source that would explain how to interpret the output.
One of the interaction variables is latent so I use XWITH and Type=Random.
I receive the error message "*** ERROR MODEL INDIRECT is not available for TYPE=RANDOM.
Variety BY Variety1 Variety2 Variety3; !(M) Expertis BY Chooser1 Chooser2 Chooser3; !(W) Inter| NumCat_3 XWITH Expertis; !(X * W) Variety ON NumCat_3 (a1)!(M on X1) Expertis (a2) !(M on W) Inter (a3); !(M on XW) Satisf1 ON NumCat_3 (c) Variety (b1); !(Y on X, M)
MODEL CONSTRAINT: PLOT(Indirect); LOOP(Expert,0,7,0.1); Indirect=(a1+a3*Expert)*b1;!(a1+a3W)b1
Thank you for all of your help you have been very responsive and helpful. MPlus is awesome.
I have the analysis I needed including the CI, plot and plot data.
As well as being SEM rather than regression and modelling latent variables, with the LOOP, MPlus is superior to running Process regressions many times with transformed IV and Moderator values as suggested in Spiller et al. JMR 2013. As an enhancement I was hoping for p-values over the range of values of the moderator in the loop plot.
Also, it looks like there's no way to get bootstrap CI. Please confirm 1. With Latent moderators, I have to use XWITH 2. With XWITH, I must use Type=Random 3. With Type=Random, Bootstrap is currently unavailable.
Hello, When I run the input below I get the following error message: "A parameter label has been redeclared in MODEL CONSTRAINT. Problem with: IND". Do I need to provide another label for the plot command? Here is my input:
MODEL: sse by smq12 smq21 smq24 smq28 smq29; pap by agq2 agq4 agq8; procp by passp1-passp3; anx by smq4 smq6 smq13 smq14 smq18; procp on gpa gender; procp on anx (b); anx on sse pap (a); procp on pap; interact | sse xwith pap; anx on interact(c); sse pap anx;
model constraint: new(ind wmodval); wmodval=.444;!+1SD sse ind=(a+c*wmodval)*b; plot(ind); loop(sse,-.444,.444,0.01);
Remove the IND parameter from the NEW statement and move the PLOT statement up before the assignment statement involving IND.
model constraint: new(wmodval); wmodval=.444;!+1SD sse plot(ind); ind=(a+c*wmodval)*b; loop(sse,-.444,.444,0.01);
Nini Wu posted on Monday, August 20, 2018 - 12:35 am
Hi, Dr Muthen, I have the following questions regarding lms. Could you please give me some suggestions? I would like to test a latent moderated mediation model-----W moderated the direct effect of X on Y and M to Y. And M is a latent variable, which is a mediator. I have the following questions, could you please give me some suggestions£¿
1. Should all the variables including DV be standardized? 2. Below are the basic codes in mplus. I would like to see the indirect effects of M to Y at different levels of W (e.g., +1SD, 0, -1SD) and plot the region of significance. Are the codes right?(All the variables are assumed standardized) Define: int1=x*w; M by m1,m2,m3; M on X(a1); Y on M(b1); Y on X(d); Y on W; Y on int1; INT2 | M xwith W; Y on int2(b2); Model constraint: New(modhigh modlow modmean indhigh indmean indlow); modhigh=+1; modmean=0; modlow=-1; indhigh=a1*b1+a1*b2*high; indmean=a1*b1+a1*b2*mean; indlow=a1*b1+a1*b2*low; plot(indirect); loop(modval,-3,3,0.2); indirect=a1*b1+a1*b2*modval;
3. How to write the mplus code about the effects of M to Y at different levels of W(e.g., +1SD, 0, -1SD) and the plot?
Thank you very much and look forward to your reply.
Hi - I am modeling a 3-way interaction using XWITH. This model includes 3 latent variables and 1 manifest variable. My manifest variable is made up of participant scores (due to the instrument being proprietary, I could not have access to individual items, and only have access to total scores). When modeling my manifest variable, I am modeling it like a latent factor with a single indicator, and am setting the error variance.
1. Is this the correct way to model the manifest variable?
So do you have 2 moderator variables (admiration and rivalry)? Or, is narcissism a second-order factor with admiration and rivalry as first-order indicators and you want to use the single variable narcissism to be the moderator?
I have one moderator variable (narcissism). The relevant literature quoted earlier does not define narcissism as a second-order factor, but as consisting of two correlated factors (of admiration and rivalry). Being new to SEM, I am not sure if I can create a second-order variable, if it is not conceptually proposed.
It appears I may have three options: a) artifically create a second-order factor, b) collapse the two correlated factors into a single factor, or c) treat the single moderator variable as two variables.
Please advise and, if possible, suggest relevant examples.
I would recommend using both the admiration factor and the rivalry factor as moderators at the same time.
For instance, if what you moderate is the influence of X on Y, you can write
y on x; admin by ...; rival by ...; xadmin | x xwith admin; xrival | x xwith rival; y on admin rival xadmin xrival;
Ahmad posted on Friday, February 01, 2019 - 9:58 am
Hi, in implementing the LMS technique (TYPE = RANDOM; ALGORITHM = INTEGRATION) I am receiving warning: "THE LATENT VARIABLE COVARIANCE MATRIX (PSI) IS NOT POSITIVE DEFINITE....CHECK THE TECH4 OUTPUT FOR MORE INFORMATION."
However, specifying TECH4 as OUTPUT generates fatal error message that TECH4 is not available with LMS. Please advise.
In most cases just checking the correlations between the latent variables would be enough - but it will have to be done by hand or by presetting the scale so the factor variance is 1.
Ahmad posted on Thursday, June 20, 2019 - 10:03 pm
Hi Prof. Muthen
I am following Sardeshmukh & Vandenberg 2017 ORM procedure for a mediation model with two moderators.
The problem is that the basic model runs fine with 1000 bootstraps with the initial model terminating at 76th iteration and bootsrapping draws taking lesser number of iterations but finishing properly. Howevever, when additional parameters are calculated through MODEL CONSTRAINT command, then the bootstrapping gets into infinite calculation loop/iterations, despite repeated attempts to run the model.
For example, the initial model calucluated last time took 90 iterations to complete but in bootstrapping it got stuck and in one draw (most likely after 10th draw--but I could not determine its exact number as scrolling up was not possible above 7500th iteration. In earlier attempts it was typically 12th draw where I terminated calculations around 1000th iteration.) the iterations continued beyond 10,000 calculation without conclusion. Please advise how to address this issue. I am sending the model in next post. Thanks and regards.
Ahmad posted on Thursday, June 20, 2019 - 10:11 pm
The model is: ANALYSIS: TYPE=RANDOM; ALGORITHM=INTEGRATION; MCONVERGENCE=0.01; MITERATIONS=100000; PROCESSORS=4; ESTIMATOR=ML; BOOTSTRAP=500; MODEL: ind by x1-x8; mod1 by w1-w4; mod2a by z1-z3; mod2b by z4-z6; mod2c by z7-z9; mod2 by mod2a mod2b mod2c; medt0 by mcrd01-mcrd05; medt1 by mcrd1-mcrd5; dept0 by y01-y05; dept1 by y1-y5; inter1|ind XWITH mod1; inter2|ind XWITH mod2; medt1 ON medt0 ind mod1 mod2 inter1 inter2 (am ax az aw axw axz); dept1 ON dept0 ind medt1 (dx bx bm); [ind] (Xmean); ind (Xvar); [mod1] (Wmean); mod1 (Wvar); [mod2] (Zmean); mod2 (Zvar); MODEL CONSTRAINT: NEW (a0 Wsd Wlo Whi Zsd Zlo Zhi Xsd Xlo Xhi Wlo1st Whi1st WloInd WhiInd Zlo1st Zhi1st ZloInd ZhiInd); a0=1; Wsd=SQRT(Wvar); Wlo=Wmean-Wsd; Whi=Wmean+Wsd; Zsd=SQRT(Zvar); Zlo=Zmean-Zsd; Zhi=Zmean+zsd; Xsd=SQRT(Xvar); Xlo=1; Xhi=7; !moderation of W on M Wlo1st=(ax+(axw*Wlo)); Whi1st=(ax+(axw*Whi)); !mediation of W on Y WloInd=Wlo1st*bm; WhiInd=Whi1st*bm; !moderation of Z on M Zlo1st=(ax+(axz*Zlo)); Zhi1st=(ax+(axz*Zhi)); !mediation of Z on Y ZloInd=Zlo1st*bm; ZhiInd=Zhi1st*bm;