Interaction effects PreviousNext
Mplus Discussion > Structural Equation Modeling >
Message/Author
 Xuan Huang posted on Monday, September 24, 2007 - 10:36 am
Dear Professors,
Could you let me know what I can do in MPLUS to interpret the interaction effects if I get significant interactions between two
observed variables in a structural models? Can we graph interactions in MPLUS? Thank you very much for your time and your help.
 Linda K. Muthen posted on Monday, September 24, 2007 - 11:35 am
You can use the PLOT option to plot the two variables together in a scatterplot. There are no options specific to interactions.
 George Burruss posted on Friday, August 29, 2008 - 12:43 pm
I got a review back on a paper that questioned my use of product of coefficients method (which I believe is the INDIRECT command in MPLUS).

I used the MODEL INDIRECT command to test for a mediation. X1 is a latent factor; Y1 is an observed variable; Y2 is a latent factor. Thus, I specified the MODEL INDIRECT as Y3 IND Y1 X1.

Two reviewers said this was a "novel" approach and that I should use the causal step method instead. But given that X1 and Y2 are latent factors, it seems, to me, better to use the INDIRECT test.

Two questions, (1) is the INDIRECT command the same as the product coefficients method? (2) Are there any drawbacks to using it rather than the causal step method (like less power)?

Thanks,

George Burruss
 Bengt O. Muthen posted on Friday, August 29, 2008 - 4:12 pm
I have some questions:

- You say y3, but do you mean

y1 IND y2 x1;

?

- what do you mean by "the causal step method"?

The answer to (1) is yes.
 George Burruss posted on Tuesday, September 02, 2008 - 3:46 pm
Sorry, my mistake; you are correct y1 IND y2 x1;

By causal step, I mean that you evaluate the direct effect of x1 on y2. If the direct path is significant, then you introduce the mediator variable (y1). Thus, you would be doing the mediation test stepwise. I do not see the difference other than the INDIRECT command does this all at once and I don't see it as novel; but, two reviewers questioned the method, asking for the causal step method.
 Bengt O. Muthen posted on Tuesday, September 02, 2008 - 3:56 pm
It is strange that the reviewer would refer to the approach used in Model Indirect as "novel" since it has been around for a long time and been written about extensively. The new book on mediation by David MacKinnon should be a useful reference for an overview and to convince the reviewer. He refers extensively to Mplus. But the approach you label causal step could also be of interest.
 brianne posted on Sunday, July 26, 2009 - 1:36 pm
I hope that these questions are not too basic, but I am new to moderation in Mplus.

I am proposing a nonrecursive path model of transactional dev. over time. Within that model, I am specifying two observed variable intxs.

A quick Mplus sketch of my model is:

Define
p14Xtemp = parent14*temp
riskXp14 = risk*parent14
riskXp24 = risk*parent24

Model
child36 on child24, parent24, risk, riskXp24, gender, treatment;
child24 on parent24, risk, parent14, riskXp14, temp, p14Xtemp, gender, treatment;
parent24 on child24, parent14, momage, gender, treatment;

Q1: Is an intx between an exog and endog variable possible (i.e., can parenting at time 2 [p24] function as both an outcome and a moderator/amplifier)?

Q2: What is your advice concerning centering for intxs? Most authors (e.g., MacKinnon) recommend centering variables for moderator analyses. Is this also recommended for an intx between an endog and exog variable (i.e., centering, x1, y1, and x1y1)?

Q3: In the case of a continuous moderator, is it still protocol to use simple slopes tests (e.g., MacKinnon,2008) for testing and interpreting the intxs in an expanded path model such as this one? I am currently planning post hoc simple slopes tests for sig. intxs, and a post hoc multi-group comparison for treatment vs control for the overall model.

Any direction would be very helpful!
 Bengt O. Muthen posted on Sunday, July 26, 2009 - 3:16 pm
Q1. Yes, this is possible in Mplus. For an example with a latent DV, see slides 161-168 of the Topic 3 Mplus course handout.

Q2. This is not necessary, but may make the interpretation easier.

Q3. The slides referred to above give interpretation of moderation with continuous moderator. I am not familiar with slopes tests for this. One can do a regular z test of whether the interaction has a significant effect. See also the reference to Klein's interaction work on these slides.
 francesca posted on Monday, July 27, 2009 - 6:46 am
Dear Professors, I´m testing the moderating effect of a continuous latent variable M on the relation between a continuous predictor latent variable X1 and a continuous outcome latent variable Y, using the XWITH option.
My model is:
MISSING = ALL(99);
ANALYSIS:
TYPE =RANDOM;
ALGORITHM=INTEGRATION;
MODEL:
X1 BY DW1 DW2 DW3;
X2 BY CO4 CO1 CO2 CO3;
M BY OP1 OP2 OP3 OP4;
Y BY R1 R2 R3;
Y ON X1 M X2;
X1 ON M X2;
X1xM | X1 XWITH M;
Y ON X1xM;
Interaction term is significant. Thus, I would like to perform simple slopes analysis for simple slopes at high and low levels of the moderator M and to plot out the graph of the relationship between Y and X1 at different values of M.
Before using Mplus, I usually tested Simple slopes analysis using Sibley´s macro. This procedure assumes that both variables X1 and M are centered around 0, variances and covariances are obtained by requesting the covariance matrix for the regression coefficients.
My questions:
1)How can I test Simple slopes analysis for simple slopes at high (+1SD) and low levels (-1SD) of the moderator M in Mplus?
2)How can I have the following values in Mplus Output:
- Standard Deviation of X1
- B (unstandardized coefficients) for constant
- Variance of interaction term
- Variance of X1
- Covariance of X1 and interaction term
Thank you in advance!
 Linda K. Muthen posted on Monday, July 27, 2009 - 9:11 am
Variances and covariances of parameter estimates are given in TECH3. You can use the CENTERING option to center variables.

Can you send us the reference for Sibley's macro to support@statmodel.com?
 francesca posted on Tuesday, July 28, 2009 - 12:22 am
Dear Linda,
Thanks a lot for your immediate answer! I sent you the reference for Sibley's macro to support@statmodel.com.
I’m sorry but I still have three questions:
1) I asked for TECH3, but the output only give me a list of numbers without variable’s name, how can I understand what is:
- Variance of interaction term
- Variance of X1
- Covariance of X1 and interaction term?

2) To use Sibley's macro I need also to know the unstandardized coefficient for the model's constant: How can I have this value in Mplus Output?

3) Is it possible to test Simple slopes analysis for simple slopes at high (+1SD) and low levels (-1SD) of the moderator M in Mplus? If Yes, How can I do this?

Thank you in advance!
 Linda K. Muthen posted on Tuesday, July 28, 2009 - 4:17 pm
It does not look like Sibley's macro is directly applicable to the latent variable interaction case because with latent variable interactions there is no variance given for the interaction term. There are probably analogous approaches with latent variable interactions but I don't know at this point what that would be.

The parameter numbers from TECH1 should be used to understand TECH3.
 francesca posted on Wednesday, July 29, 2009 - 3:17 am
Dear Linda,
Thanks a lot for your answer.
I think that, for the information I have now at my disposal, the only solution it's to test interaction with observed variables and Simple slopes analysis using Spss.
 Elisabet Solheim posted on Wednesday, December 01, 2010 - 8:04 am
Hi,

I am pretty new to running moderations in MPLUS. I have used MPLUS to runs a simple blockwise regression with two way interactions. I found some significant interactions and I would like to chart them. I thus have 2 questions
1:Can this be done using the PLOT command?
2:Where can I find the constant in the output?

This is my model:SSRSFTTO ON PSB1X01
AgeCl MoAB BmED BMVCl FAD PREM
AUDITs CBQNA GENDER SESGR DCTOT2 SqDCTOT2 SqGrExp GREXPO2 GEND4;

GEND4 being the interaction variable.

Best Elisabet
 Linda K. Muthen posted on Thursday, December 02, 2010 - 10:02 am
The constant is found in the Result section of the output under Intercepts or Thresholds.

The PLOT command does not have this option.
 Chong M. Chow posted on Tuesday, April 05, 2011 - 11:14 am
Dear Drs. Muthen,

I wonder the XWITH and | options are appropriate for an interaction term defined by a continuous observed variable and a latent growth variable?

Thank you so much for your time.
 Linda K. Muthen posted on Tuesday, April 05, 2011 - 11:55 am
XWITH can be used with two latent variables or one latent variable and one observed variable.
 Chong M. Chow posted on Tuesday, April 05, 2011 - 2:22 pm
Thank you so much Dr. Muthen.
 Chong M. Chow posted on Monday, April 11, 2011 - 11:46 am
Hi Drs. Muthen,

I ran a model with an interaction term (predictor) defined by a continuous observed variable and a latent growth variable? The model did not converge and I received the following error messages. I am wondering of they are results of model model mispecifications (i.e., having too many latent growth variables in the model). I really appreciate if you could give me some guidance.

Thank you so much.

THE MODEL ESTIMATION DID NOT TERMINATE NORMALLY DUE TO A CHANGE IN THE
LOGLIKELIHOOD DURING THE LAST E STEP.

AN INSUFFICENT NUMBER OF E STEP ITERATIONS MAY HAVE BEEN USED. INCREASE
THE NUMBER OF MITERATIONS OR INCREASE THE MCONVERGENCE VALUE. ESTIMATES
CANNOT BE TRUSTED.
SLOW CONVERGENCE DUE TO PARAMETER 21.
THE LOGLIKELIHOOD DERIVATIVE FOR THIS PARAMETER IS 0.74655803D+00.
 Linda K. Muthen posted on Monday, April 11, 2011 - 2:16 pm
You can take the advice of the message and increase the number of MITERATIONS or increase the MOCONVERGENCE value. If this does not help, please send the output and your license number to support
 Chong M. Chow posted on Tuesday, April 12, 2011 - 8:39 am
It ran after i made the adjustment. Thank you so much.
 Helen Zhao posted on Wednesday, May 25, 2011 - 7:45 pm
Dear Drs Muthen,

Hi, I am trying to find the constant for graphing interaction plot as you suggested in your previous messages. I found constant for all my indicators but not able to find constant for the latent variables under the intercept output. I wonder should i average these intercepts and use it as the constant of the latent variable?

Thanks,
Helen
 Linda K. Muthen posted on Thursday, May 26, 2011 - 10:55 am
Means and intercepts of latent variables are zero in cross-sectional models. They can be identified only in multiple group and multiple time point models.
 Jan Eichhorn posted on Thursday, October 13, 2011 - 9:55 am
Dear Drs. Muthen, my model became problematic after adding two interaction effects between the latent variables and a categorical observed variable:

THE MODEL ESTIMATION DID NOT TERMINATE NORMALLY DUE TO A NON-POSITIVE DEFINITE FISHER INFORMATION MATRIX. CHANGE YOUR MODEL AND/OR STARTING
VALUES. THE MODEL ESTIMATION HAS REACHED A SADDLE POINT OR A POINT WHERE THE OBSERVED AND THE EXPECTED INFORMATION MATRICES DO NOT MATCH. THE CONDITION NUMBER IS -0.446D-03. THE PROBLEM MAY ALSO BE RESOLVED BY DECREASING THE VALUE OF THE MCONVERGENCE OR LOGCRITERION OPTIONS.


I am not sure how to proceed from here really, as I am new to modelling interaction effects involving latent variables and would be grateful for any advice on what might be a helpful way to proceed from here.Thank you so much for your time. Below are my model commands.

Connect BY wMemWelf wMemRel wMemEdA wMemLaUn wMemPoPa wMemLoPA wMemHumR wMemCons wMemProf wMemYouW wMemSpoL MemWome wMemPeac wMemHeal wMemOthe;
WMEMPEAC WITH WMEMWOME;

General BY GenTru Helpful Fair;

General ON LnInc_I DV_HEd;
Connect ON LnInc_I DV_HEd;
Connect WITH General

DV_U ON LnInc_I DV_HEd General Connect;

Gen_U | DV_U XWITH General;
Con_U | DV_U XWITH Connect;

LifeSat ON DV_U Sex Age AgeSq DV_HEd LnInc_I DV_Mar DV_Chi Connect General Gen_U Con_U;
 Linda K. Muthen posted on Thursday, October 13, 2011 - 11:48 am
Please send the full output and your license number to support@statmodel.com.
 Heike B. posted on Wednesday, December 14, 2011 - 11:25 am
I have defined an interaction between two exogenous variables

Y ON X1 X2 X1*X2

The path coefficient for X1 was insignificant while the path coefficient for the interaction term X1*X2 was significant.

Would it be correct to drop the individual path between X1 and Y, i. e. changing the model to

Y ON X2 X1*X2 ?

Many thanks in advance.
Heike
 Linda K. Muthen posted on Wednesday, December 14, 2011 - 11:48 am
I would not do that. This can lead to over fitting and make the results difficult to replicate. Just report it as not significant.
 Heike B. posted on Wednesday, December 14, 2011 - 1:36 pm
Thank you, Linda. I really appreciate your comments.

Heike
 Page posted on Wednesday, February 08, 2012 - 11:13 am
We have 2 observed categorical variables with interaction effect on a factor [f ON x1 x2 x1*x2]. The observed variables are correlated (which we account for: x2 ON x1) but this means that x1 and x2 are also correlated with the interaction term. Should we specify these correlations in the model [x1 WITH x1*x2; x2 WITH x1*x2]? When we do, our model becomes non-recursive, and the loadings of f go haywire.

thanks for any help on this.
 Linda K. Muthen posted on Wednesday, February 08, 2012 - 2:24 pm
You should not mention the means, variances, or covariances of observed exogenous variables. These are not parameters in a regression model. I'm not sure why you have x2 ON x1. x2 is no longer exogenous when you add this. It is not necessary to specify more than

f ON x1 x2 x1*x2

x1 and x2 are not uncorrelated in model estimation. To see their correlations, do a TYPE=BASIC;
 Page posted on Thursday, February 09, 2012 - 3:02 pm
But what if we see x2 as endogenous as well (let's call it y2)? We have y2 ON x1, and as a partial mediation f ON y2 x1. Is it "allowed" to put the interaction between y2 and x1 in this model, and if so, should we account for its correlation with y2 and/or x1?

thanks.
 Linda K. Muthen posted on Friday, February 10, 2012 - 9:57 am
If you model includes y2 ON x1 it cannot include y2 WITH x1. Both parameters cannot be identified.
 Ahmet Coymak posted on Tuesday, February 14, 2012 - 5:21 pm
Dear Muthen,
I have a moderated mediation (conditional mediation) model with continues latent DV, IV, and mediation; and continues observed moderation as in below. As far as I could understand following discussion here, there is no option to use plot to simply see the significant interaction term in plot graph in Mplus. Then my question is that
1)how can I interpret the direction of the significant interaction to be able to confirm whether it was like it had been suggested in theoretical model?
additionally,
2)could I add two or more interactions in the same equation?
3) could I use Bootstrapping to asses
moderated mediation?
4)could I run the moderated mediation model as a multigroup analysis with 2-level categorical group variable?

Many thanks,
Ahmet
P.S.

USEVAR are a1-a3 b1 b2 c1-c3 modrt;
ANALYSIS:
type =random;
MODEL:
F1 by a1 a2 a3;
DV by b1 b2;
MED by c1 c2 c3;
interaction | F1 xwith modrt;
DV on MED F1 modrt interaction;
MED on F1;
F1 with modrt;
OUTPUT: tech1 tech8;
 Linda K. Muthen posted on Wednesday, February 15, 2012 - 10:10 am
Mplus does not provide an interaction plot at the present time. You would need to do the plot outside of Mplus, for example, in Excel or R.

1. This information is contained in the regression coefficient of the interaction term.

2. Yes.

3. It is not available with TYPE=RANDOM.

4. Yes.
 Ahmet Coymak posted on Wednesday, February 15, 2012 - 2:49 pm
Thank you, Dear Muthen. I really appreciate your comments.

Ahmet
 Ahmet Coymak posted on Thursday, February 16, 2012 - 11:18 am
regarding the model I mentioned above, I am following Preacher at.all's procedure to get simple intercepts and slopes, the
region of significance, and points to plot for significant interaction term that i found.
http://quantpsy.org/interact/mlr2.htm

with the below equation, i have tried to obtain values of regression coefficients and coefficient variances by asymptotic covariance matrix, by using tech1 and tech3 output in Mplus.

DV= B0+B1F1+B2MED+B3modrt+B4interaction

my problem is that I can't be sure whether or not latent variable's intercept,B0, was fixed zero in the equation by Mplus.
if it is, can i use values of regression coefficient and coefficient variance for B0 as zero in Preacher's procedure?
if it is not, how can i obtain value of B0 from any output?

I would greatly appreciate any suggestions
you might have for solve this problem, or any literature you might point me to read.
 Linda K. Muthen posted on Friday, February 17, 2012 - 2:04 pm
If the intercept is not printed in the output, then it is zero and you should use zero for B0.
 Elizabeth Penela posted on Thursday, March 08, 2012 - 11:20 am
Hi Dr. Muthen,

I've read this message board carefully because I am trying to interpret the significant effect of an interaction between two latent variables. My DV is also a latent variable. Indicators for all latents are continuous.

1. Someone asked in a previous post: "How can I interpret the direction of the significant interaction to be able to confirm whether it was like it had been suggested in theoretical model? " And you answered: "This information is contained in the regression coefficient of the interaction term."

Could you please elaborate on how to interpret the regression coefficient or point me to any helpful readings?

2. Is it possible to graph this interaction?

3. In an earlier post you said: "Means and intercepts of latent variables are zero in cross-sectional models. They can be identified only in multiple group and multiple time point models."

My model is a multiple time point model (predictor, moderator, and DV all at separate time points - though I'm not sure how Mplus would know that?). How do I calculate means and intercepts of the latent variables?

Thank you so much for your help.
Elizabeth
 Linda K. Muthen posted on Friday, March 09, 2012 - 3:25 pm
1. See the Topic 3 course handout on the website starting at Slide 164 and seeing in particular Slikes 170 and 171.

2. There is no plot automatically produced.

3. You need to have measurement invariance across time for the means to be identified.
 Elizabeth Penela posted on Tuesday, March 13, 2012 - 11:47 am
Dear Dr. Muthen,

Thanks for your help. I should clarify that this is not a growth model. It is a latent moderation model where both the predictor and moderator are latent variables.

Here is the syntax for the moderation model:

BIxER|BI_temp xwith ER_S;

Soc_comp on BI_temp ER_S BIxER;

I have a significant effect for the interaction term (BIxER). I am trying to generate mean and variance for the latent variables so that I can produce a plot.

Basically, I have this same question:
http://www.statmodel.com/discussion/messages/11/7963.html?1314223342

Thank you for your time,
Elizabeth
 Linda K. Muthen posted on Tuesday, March 13, 2012 - 2:54 pm
You can obtain the mean and variance of the latent variables by asking for TECH4 in the OUTPUT command.
 Elizabeth Penela posted on Wednesday, March 14, 2012 - 7:46 am
Thanks for your help. Because I am using the XWITH command to form my interaction term, I have to use "TYPE = RANDOM." Therefore, when I ask for TECH4 in the output command, I get this error message:

*** WARNING in OUTPUT command
TECH4 option is not available for TYPE=RANDOM.
Request for TECH4 is ignored.

Do you have any other suggestions for how to generate mean and variance for the latent variables?

Thanks so much for your time,
Elizabeth
 Bengt O. Muthen posted on Wednesday, March 14, 2012 - 6:19 pm
Primarily, you need the mean and variance of the two factors BI_temp ER_S. If the factors are not regressed on observed variables, they have mean zero. Their variances would have to be expressed by usual formulas, using the Model Constraint command and labels for parameters given in the Model command (for a general example, see UG ex5.20).

For how to compute the variance of the dependent variable, see the FAQ on our website titled:

"The variance of a dependent variable as a function of latent variables that have an interaction is discussed in Mooijaart and Satorra"
 Elizabeth Penela posted on Monday, March 19, 2012 - 8:11 am
Thank you so much, Dr. Muthen. This was very helpful!!

Is it possible to get the intercept of a latent Dependent Variable (that has been regressed on 2 latent predictor variables)? That is the last piece of info I need, and then I will be set for graphing my latent variable interaction.

Thank you so much for your time,
Elizabeth
 Linda K. Muthen posted on Monday, March 19, 2012 - 1:24 pm
In a cross-sectional model, the intercept of a latent variable is zero.
 Elizabeth Penela posted on Thursday, March 22, 2012 - 11:57 am
Thanks so much. I really appreciate your help.

For anyone on the boards who might be interested, I found this article very helpful in graphing latent interactions:

http://www.unige.ch/fapse/mad/static/fuerst/continuous-variable-interaction.pdf

Best,
Elizabeth
 una posted on Wednesday, October 30, 2013 - 1:43 am
Dear Prof. Muthen,
I am running an interaction between a latent factor and a manifest variable (using XWITH). I have two questions regarding this analysis:
1. When I am estimating with full information maximum likelihood, I get the following warning:
*** WARNING. Data set contains cases with missing on variables used to define interactions. These cases were not included in the analysis. Number of such cases: 101
--> Is it not possible to use FIML with such an interaction?
2. Makes the XWITH statement use of the method of Klein? To support his with a reference, can I refer to the following paper? Klein and Muthen (2007). Quasi-maximum likelihood estimation of structural equation models with multiple interaction and quadratic effects. Multivariate Behavioral Research, 42, 647-673.

Thank you very much in advance,
 Bengt O. Muthen posted on Wednesday, October 30, 2013 - 9:38 am
1. It is possible – use algorithm=integration; integration=montecarlo(500);

2. Mplus uses ML, which is the same as the Klein-Moosbrugger Psychometrika article we refer to in the UG. The Klein-Muthen approach is not ML but quasi-ML; this method is not used in Mplus.
 una posted on Thursday, October 31, 2013 - 9:17 am
Dear Prof. Muthen,
Thank you for your reply. With regard to the first answer. I tried this syntax, but I still receive the following warning: "Data set contains cases with missing on variables used to define interactions. These cases were not included in the analysis. Number of such cases: 101”
--> Can you help me to clarify what is happening?
Thank you very much in advance
 Bengt O. Muthen posted on Thursday, October 31, 2013 - 8:57 pm
Please send this output to Support.
 Heather Knous-Westfall posted on Wednesday, February 19, 2014 - 11:09 am
I am trying to plot an interaction using an excel spreadsheet, but am unclear as to what counts as the intercept!

My model is:
MODEL:
F1xx3 | F1 XWITH x3;
y10 on F1xx3

The output shows me intercepts for y1-y5 (the variables that make up F1) and y10.

What intercept am I supposed to use?

Thanks in advance!
 Bengt O. Muthen posted on Wednesday, February 19, 2014 - 11:33 am
The only relevant intercept would be for y10.
 Heather Knous-Westfall posted on Wednesday, February 19, 2014 - 11:36 am
Great, thanks! That's exactly what I thought, but wanted to verify. Also, I understand that latent variables have a mean of zero. What is the standard deviation then, is it 1?
 Bengt O. Muthen posted on Wednesday, February 19, 2014 - 11:46 am
You have their variances in the output. For exogenous factors you can set their metric by fixing their variances at 1 instead of the first loading.
 Sharon kwan posted on Wednesday, February 11, 2015 - 6:41 pm
Dear Professor Muthen,
I am trying to do a multilevel three-wave interaction model. There is a variable in two time-point for one variablefor my research. I tried to find the old and new version 7.3 of mplus, there is no multilevel three-wave interaction model. Please correct me if I am wrong.

Below are the syntax.

TITLE: Model 2;
Data: File is C:\Users\kwass004\Desktop\model\12.02.15\model12.02.15.dat;
variable: NAMES ARE B1-B18 P1-P12 C1-C3 WB1-WB18 Org;
CATEGORICAL = B1-B18 P1-P12 C1-C3 WB1-WB18;
BETWEEN = P1-P12;
WITHIN = B1-B18 C1-C3 WB1-WB18;
CLUSTER = Org;
ANALYSIS: TYPE = TWOLEVEL;
MODEL:
%WITHIN%
WBT1 BY B1-B18;
CST1 BY C1-C3;
WBT2 BY WB1-WB18;
WBT2 ON WBTime1;
CT1 xwith WBTime1;
WBT2 ON PT1;
%BETWEEN%
PT1 BY P1-P12;
CST1xWBT1xPT1 | CST1xWBT1 xwith PT1;
OUTPUT: TECH TECH8;

I ran the analysis and the result is *** ERROR in MODEL command
To declare interaction variables, TYPE = RANDOM must be specified
in the ANALYSIS command.

This gives me a message saying that the three-waves is only applicable for single level not multilevel. Please advise.
And if mplus can analysis 3 waves interaction in multilevel (with one variable show two-time point, can you please check the syntax. I hardly find in mplus guideline for the full syntax.

Many Thanks.
 Sharon kwan posted on Wednesday, February 11, 2015 - 6:43 pm
Sorry, this is the syntax.

Below are the syntax.

TITLE: Model 2;
Data: File is C:\Users\kwass004\Desktop\model\12.02.15\model12.02.15.dat;
variable: NAMES ARE B1-B18 P1-P12 C1-C3 WB1-WB18 Org;
CATEGORICAL = B1-B18 P1-P12 C1-C3 WB1-WB18;
BETWEEN = P1-P12;
WITHIN = B1-B18 C1-C3 WB1-WB18;
CLUSTER = Org;
ANALYSIS: TYPE = TWOLEVEL;
MODEL:
%WITHIN%
WBT1 BY B1-B18;
CST1 BY C1-C3;
WBT2 BY WB1-WB18;
WBT2 ON WBT1;
CT1 xwith WBT1;
WBT2 ON PT1;
%BETWEEN%
PT1 BY P1-P12;
CST1xWBT1xPT1 | CST1xWBT1 xwith PT1;
OUTPUT: TECH TECH8;
 Linda K. Muthen posted on Thursday, February 12, 2015 - 6:07 am
Please send your output and license number to support@statmodel.com.

Please limit posts to one window.
 Ari J Elliot posted on Tuesday, March 03, 2015 - 11:24 am
Hello Drs Muthen. I am trying to examine simple slopes corresponding an interaction of 2 latent variables. My syntax is as follows:

MODEL: f1 by x1 x2 x3 x4;
f2 by x5 x6 x7;
f3 by x8 x9 x10;
f1xf2 | f2 XWITH f1;
f3 on f1 (b1);
f3 on f2 (b2);
f3 on f1xf2 (b3);
f3 on c1 c2 c3 c4 ! observed covariates

MODEL CONSTRAINT:
NEW(ss1-ss3);
ss1=b1+b3*(-11.5);
ss2=b1;
ss3=b1+b3*(11.5); ! 11.5 = SD of f2 from output

Is this an appropriate means of obtaining simple slopes, and would tests of significance provided in the output also be appropriate?

Thanks very much for your assistance.
 Bengt O. Muthen posted on Tuesday, March 03, 2015 - 12:08 pm
Yes. You can also check the FAQ:

Latent variable interaction LOOP plot
 Cheng posted on Tuesday, May 19, 2015 - 6:17 pm
Can I include significant interaction term and test indirect effect on a model in mplus? I got a very weird result on the "model indirect". All estimation values in output under section "Total, total indirect, specific indirect, and direct effects" are ZERO.
 Bengt O. Muthen posted on Tuesday, May 19, 2015 - 6:37 pm
With interaction terms you should instead use the new MOD option of Model indirect. See the version 7.2 Language Addendum under the heading:

Mediation analysis with direct and indirect effects based on
counterfactuals (causal inference)
 Cheng posted on Tuesday, May 19, 2015 - 7:29 pm
Following questions:
1) does the MOD option applies for MLR and MLM estimator? (in the paper is stated ML)

2) if I have two mediators, I need to run each mediator with the moderator/interaction term in a separate model right?
 Bengt O. Muthen posted on Wednesday, May 20, 2015 - 11:29 am
1) Yes.

2) No, that would give the wrong "b" values because both mediators influence y. But you can use the MOD formula for each mediator (I assume the mediators are parallel, not sequential). See e.g. Preacher et al 2007 for the formula or my 2011 causal effects paper.
 Seulki Ku posted on Wednesday, December 23, 2015 - 6:12 pm
Dear Dr. Muthen,

I'd like to run interactions effects with weights. I have two questions in terms of the sample size.

1.

Like Una, I received the warning:

"Data set contains cases with missing on variables used to define interactions. These cases were not included in the analysis. Number of such cases: 146"

As you suggested for Una on Oct. 31st, 2013, I added the following lines in the syntax. But I still receive the same warning.

algorithm=integration; integration=montecarlo(500);

2.
Another warning I received is below:

"Data set contains unknown or missing values for GROUPING,PATTERN, COHORT, CLUSTER and/or STRATIFICATION variables. Number of cases with unknown or missing values: 4252"

I included weights, stratum, and PSUs in the syntax. I got a sample size of 9570 before I added interaction terms. However, after adding interaction terms, I got a sample size of 4650.

Could you please help me with the two issues?
 Bengt O. Muthen posted on Thursday, December 24, 2015 - 6:09 pm
1. I think you can't use DEFINE but instead work with a factor behind each of the 2 variables and let the interaction be handled in the Model command using XWITH between the factors.

2. The warning says it all. Find out why you have missing values on those variables. To see why your sample size dropped so much you have to send data, and the 2 outputs to Support along with your license number.
 Jacqueline Sims posted on Thursday, March 10, 2016 - 9:32 am
Hello,

I would like to follow up on prior questions about testing simple slopes for interaction terms between two observed variables. Is this possible? It seems that there should be a way using the model constraint command, but I haven't quite sorted it out.

Thank you very much for any insights.
 Bengt O. Muthen posted on Thursday, March 10, 2016 - 6:02 pm
See information on our Mediation page

http://www.statmodel.com/Mediation.shtml
 Zhi Li posted on Wednesday, March 16, 2016 - 3:58 pm
Dear Dr. Muthen,
Are you aware of any method to do a region of significance test based on Mplus output of multiple group analyses for interaction?
So we are conducting a gene-X-environment analyses based on SEM multiple group analyses, by comparing the free model vs. model only constraining the path of interest to be equal between two allelic group to see whether the two groups differ in that specific path.
The reviewers, however, require us to provide the regions of significance results. We are aware that doing XWITH test (i.e., regressing outcome on genotype, and the interaction term) will do the trick, but the XWITH test differ a bit with the multiple group analyses, actually.
So in general could you please give us some advice on how to get ROS results based on multiple group analyses? Thanks so much for your time!
 Linda K. Muthen posted on Wednesday, March 16, 2016 - 4:39 pm
See the FAQ on the website called Latent variable interaction LOOP plot.
 Ksenia Kirillova posted on Friday, April 15, 2016 - 2:31 am
Dear Drs,

I have been trying to run the SEM analysis with an interaction effect between a latent and an observed variable. In my model, I have a latent continuous variable, an observed continuous independent variable, and an observed continuous dependent variable. I saw on this forum somewhere that I should be able to estimate the moderated model by using the XWITH command. However, when I do this, I do not get a path estimate from the observed to dependent variable. Basically, I only get two path estimates: from the latent to the dependent and from the interaction to the dependent. What am I doing wrong? I greatly appreciate your time!
 Linda K. Muthen posted on Friday, April 15, 2016 - 6:54 am
Please send the output and your license number to support@statmodel.com. You will get what you specify in the MODEL command.
 Jan posted on Wednesday, November 08, 2017 - 5:04 am
Trying to obtain the correct plot of the cross-level interaction. Could you give me a hint how to adjust the code of the MODEL CONSTRAINT to get a plot that is equivalent to two simple slopes from a linear regression?

ANALYSIS:
TYPE = TWOLEVEL RANDOM;
ESTIMATOR = MLR;
PROCESSORS = 4;
ITERATIONS 3000;
DEF: b_x_c = b*c

MODEL:
%WITHIN%

s1 | a ON c ;
s2 | a ON b ;
s3 | a ON b_x_c ;

%BETWEEN%
a s2 s3 ON z q ;
s1 on z (b) ;
s1 on q ;
[s1] (a) ;
[a] (c) ;
s1 with a ;

MODEL CONSTRAINT:
PLOT(crosslvl crosslv2) ;
LOOP(mod, -2, 2, 0.1) ;
crosslvl = a+b*mod ;
crosslv2 = a+c*mod ;
 Bengt O. Muthen posted on Thursday, November 09, 2017 - 4:57 pm
Have a look at slide 45 of our Topic 7 short course handout on our website. That gives you a start.
 Jan posted on Thursday, November 09, 2017 - 5:10 pm
I see, thank you.
 Jordan posted on Monday, January 08, 2018 - 1:41 pm
Can one use the MOD command with XWITH? Or does the interaction need to involve observed variables only?

I am trying to obtain the total effect (and the respective significance test) for a latent interaction created using XWITH. I know how to obtain conditional indirect effects, and of course the direct effect would be given, if modeled, as a conventional beta coefficient. But how would I obtain a total effect, or even an indirect effect that isn't conditional, but instead is just derived from the latent interaction variable. All my variables are continuous.
 Bengt O. Muthen posted on Monday, January 08, 2018 - 5:52 pm
No on your first question. UG pages 764-765 show which variables in the mediation model can be latent when using MOD.

But you could probably derive the effects and use Model Constraint. You don't say which of the X-M-Y variables (and moderator Z) are interacting.
 Jordan posted on Tuesday, January 09, 2018 - 8:14 am
Thank you for your prompt response.

I am interacting M (exogenous moderator) with X (exogenous predictor). So it is a first-stage moderated-mediation model.

I have used Model Constraint previously to examine conditional indirect effects, but am uncertain about the syntax (formulas) I'd need to compute the total effect (and the "non-conditional" indirect effect).
 Bengt O. Muthen posted on Tuesday, January 09, 2018 - 10:54 am
So M and X interact in their influence on the mediator? Is it M that is latent? I assume the mediator has a different name than the usual M. Is the mediator continuous and observed? Is Y continuous and observed?
 Jordan posted on Tuesday, January 09, 2018 - 11:15 am
Yes, M and X interact to influence the mediator (call it Z). All the variables (including Y) are latent and continuous.

So, just to be clear, X and M interact to predict Z which predicts Y. All are latent, continuous variables.
 Bengt O. Muthen posted on Tuesday, January 09, 2018 - 11:59 am
The effects are given in our book on page 92:

indirect: b1(g1+g3)(x1-x0)

direct: (b2+b4*m)(x1-x0)

where I will use the book's notation

X: exposure

Z: moderator

M: mediator

Y: outcome

and

b1 is the reg coeff for y regressed on m,

g1 is the coeff for m regressed on x,

g3 is the coeff for m regressed on xz (the interaction)

b2 is the coeff for y regressed on x,

b4 is the coeff for y regressed on xz (b4=0 for you it sounds like)

and z is a particular value on z, and where x1 and x0 are particular values on x (e.g. x0 is the mean and x1 is one SD above the mean, where in your case the SD is the square root of the x factor variance).

So you just give parameter labels in the Model command and express these two effects and their sum in the Model Constraint command. You can also use Plot and Loop (see our book).
 Jordan posted on Wednesday, January 10, 2018 - 12:26 pm
I see. Might I get the total indirect effect of the interaction (xz) if I simply multiply g3 and b1? (and then the Model Constraint command would produce a bootstrapped significance test).

And could I add that total indirect effect to the direct effect of the interaction on the outcome (i.e., g3*b1+b4) in order to get the total effect of the interaction on the outcome (with its associated bootstrapped test)?

Rather than estimate conditional effects based on particular values of x or z, I'm mainly interested in the significance of the total effect of xz(i.e., both indirect and direct) on y.
 Bengt O. Muthen posted on Thursday, January 11, 2018 - 4:01 pm
First, I made an error - it should say

indirect: b1(g1+g3*z)(x1-x0)

direct: (b2+b4*z)(x1-x0)

where z refers to particular values of the moderator z.

Regarding your question, I don't think it is as easy as that. First, you have to settle the (x1-x0) term where these are values on your latent x variable. Second, if you want effects overall - for all values of z - you would have to compute it for all z values and average it.

You could instead do a moderation plot for the two effects using LOOP and PLOT in the Plot command for the model with z. And then compare that plot with the effects that you get when you don't include the interaction term in the model.
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: