Message/Author 


I am trying to model an interaction between 2 latent variables. I keep getting the following error message: 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 63.THE LOGLIKELIHOOD DERIVATIVE FOR THIS PARAMETER IS 0.12262334D+04. I tried increasing the number of minterations up to 5,000 and I keep getting this message. Is there anything else I can try to resolve this issue? Thank you for any help, 


Please send your input, data, output, and license number to support@statmodel.com. 


Dear Drs. Muthen, I am trying to incorporate an interaction in a latent variable SEM model between one of my latent exogenous variables and an observed exogenous variable. I read the article by Marsh, Wen, and Hau (2004) entitled "Structural Equation Models of Latent Interactions: Evaluation of Alternative Estimation Strategies and Indicator Construction." These authors discussed various choices of which indicators to center and crossmultiply when creating a latent interaction between two latent variables. However, in my case, one variable in the interaction is latent, and the other is observed. Should I center all of the indicators, as well as the observed variable, and then crossmultiply each of the centered indicators with the centered observed variable, to create the indicators for the latent x observed interaction term? Thanks very much for your help, Lisa M. Yarnell 


Also, please note, Drs. Muthen: This question pertains to analyses I personally am doing for my dissertation, using Mplus. 


You can use the XWITH option to estimate an interaction between a latent and observed variable. You can center the observed variable but should not center the factor indicators. 


Hi Dr. Muthen, I tried XWITH in the following code. The model is taking over an hour to converge. Is this due to the sheer complexity of the modelI used XWITH twice, and am working with a large data setor did I do something wrong in my code? CENTERING = GRANDMEAN(povratio EDACH); WEIGHT IS gswgt4; DEFINE: pratxEDC = povratio * EDACH; ANALYSIS: TYPE = RANDOM; MODEL: F1 BY LN_HRS GOAL INS RETIRE VAC; LN_HRS WITH GOAL; F2 BY LN_PEARN HHINC OWNMORT COMB_ASS; F3 BY PHONE NOMORT EVICT UTILP UTILO FOOD; F4 BY CONT1 CONT2 CONT3 CONT4; CONT2 WITH CONT3; F5 BY CONT5 CONT6 CONT7 CONT8 CONT9; pratxOCC  povratio XWITH F1; pratxINC  povratio XWITH F2; CONT7 WITH CONT8; CONT8 WITH CONT9; F1 WITH EDACH; EDACH WITH F2; F1 WITH F2; F3 WITH LADDER; F3 WITH F4; F3 WITH F5; LADDER WITH F4; LADDER WITH F5; F4 WITH F5; F1 on povratio; F2 on povratio; EDACH on povratio; F3 ON F1 EDACH F2 povratio pratxOCC pratxEDC pratxINC; LADDER ON F1 EDACH F2 povratio pratxOCC pratxEDC pratxINC; F4 ON F1 EDACH F2 povratio pratxOCC pratxEDC pratxINC; F5 ON F1 EDACH F2 povratio pratxOCC pratxEDC pratxINC; HEALTH ON F1 EDACH F2 F3 LADDER F4 F5 povratio pratxOCC pratxEDC pratxINC; 


I would suggest first running the model with only the BY statements. I would then add the ON statements and after that add one XWITH at a time. A poorly specified model can take a long time to converge and the poor specifications can be in any part of the model. A stepwise approach is needed. 


Thanks for all of your help, Dr. Muthen. So far, the estimation is still taking a long time. Would my results be incorrect if I tried to create indicators for the latent interaction by hand, rather than using the XWITH option? I could do this by centering the measured variable, centering the latent variable's indicators, crossmultiplying them, and using these crossmultiplied terms as indicators of the latent variable interaction? This seems to be the approach suggested by authors such as Marsh, Wen, and Hau (2004), mentioned above. Or would trying to construct the latent interaction "manually" in this way lead to incorrect results? 


Have you taken the steps I suggested? If just the BY statements take a long time, you should send the full output and your license number to support@statmodel.com. 


Dr. Muthen, Yes, I am trying the stepwise approach you suggested. I determined the measurement models in a previous stage of the research, so I believe that the specification of the portions of this model with the BY statements are OK. Basically, I am trying to add three interactions to the model (povratio x F1, povratio x EDACH, and povratio x F2), two of which are latent (the interactions with F1 and F2), along with the main effect of povratio. The three interactions are represented in the terms pratxOCC, pratxEDC, and pratxINC. First, I added the main effect of povratio; this worked, and the the model ran quickly. Then, I added in the interaction pratxEDC; this worked. The run time becomes slow, however, when I try to add in one of the latent interaction terms using the XWITH command. I started by trying to add in pratxOCC. I also had to add in the line ANALYSIS: TYPE = RANDOM in order to use the XWITH command. Could making the analysis type RANDOM be what is slowing down the run time? Thank you again. 


XWITH involving a latent variable can be slow if you work with a very large data set. If that's the case, you can take a random sample of say n=1000 and do a preliminary model investigation. That then gives you good starting values for a final analysis using the full data. 


Thanks, Dr. Muthen. I will try starting values. I saw some sample code online for starting values for the measurement portion of the model. That code looked like this: trend1b BY y11@0 y12@1 y13*2.5 y14*3.5; (The 2.5 and 3.5 represent starting values.) How do I supply starting values for direct effects in the model? Could you give me a line of code I could use as a model? (I am just not sure where to place the starting values for direct effects.) 


See pages 588589 of the current user's guide. If this is not sufficient to help you, send your input, output, and license number to support@statmodel.com. 


Hi Linda, I am not permitted to send you the data (at least, not the 100% sample of it) because it is secure, and the XWITH command is still making the program run very slowly. I have a mix of dichotomous and continuous indicators. If I try to create the latent interaction term "by hand," without using XWITH, should I center the indicators or not? For example, should I center the continuous indicators, not center the dichotomous indicators, then crossmultiply scores on these indicators, and use the crossmultiplied terms as indicators of the new latent variable? I am unsure whether I should be centering the indicators or not. Ideally, I would use the XWITH command to handle all of this, but it is not working (in a reasonable amount of time, at least). Thanks for your time, Lisa 


I would not use the indicator approach. I wonder if the model ran without the interaction. If so, send the output without the interaction and the input with the interaction to support@statmodel.com. If not, that is the place to start. 


Hello Dr. Muthen, I successfully ran a model where I have an interaction between 2 latent variables predicting a latent variable outcome (all indicators for predictors and outcome are continuous). What I am trying to do now is run multiple group analyses with this model. Specifically, my groups will be boys = 0, girls = 1. I am having difficulty with this as it seems that I should use the TYPE = MISSING command for multigroup analyses, but the TYPE = RANDOM command when using the XWITH command. How can I do a multiplegroup analyses while still keeping my latent interaction term? Thank you for your time. Best, Elizabeth 


I have some related questions: I am attempting to account for the relation among three measured control variables (two categorical) that predict latent variables but I saw that the WITH command causes the variables to be treated as dependent. How do I include this in my model where I am also going to include an interaction between two of the latent variables in predicting a third latent variable? I looked at the handouts for the Mplus Short Course Topic 1 (Exploratory Factor Analysis, Confirmatory Factor Analysis, And Structural Equation Modeling For Continuous Outcomes from August 6, 2009)where there is an example of CFA with covariates. The covariates are shown as covarying with one another in the model on slide 171, but there is no indication in the commands of this. Do these relations need to be specified or are they included in the analysis automatically? How do I obtain the output if they are automatically specified? Thank you for your help, Alexis 


Elizabeth: You need to use TYPE=MIXTURE and the KNOWNCLASS option. This is the same as multiple group analysis when all classes are known. See Example 7.21 to see how the KNOWNCLASS option is set up. 


Alexis: The correlations among observed exogenous covariates do you need to be specified. In regression, the model is estimated conditioned on these variables. Their means, variances, and covariances are not model parameters. To obtain these values, do a TYPE=BASIC. 


Thank you very much! Alexis 


Thanks very much for your help. Elizabeth 

Steve posted on Friday, July 05, 2013  5:44 am



Hello, I am wondering if you could refer me to any information which explains: a) How Mplus calculates latent variable interactions b) The most appropriate way to interpret (and plot) these interactions I think this may have been available at one point through the "short courses" section  however, it no longer appears to be there. Many thanks. 


a) It is based on the Klein and Moosbrugger article found in the reference list of the user's guide. b) See the Latent Variable Interaction FAQ on the webiste. 

Steve posted on Monday, July 08, 2013  7:38 am



Dear Linda. Got it  thanks very much. 

Steve posted on Thursday, July 11, 2013  4:24 am



Dear Linda/Bengt, I am testing moderation with an interaction term between two continuous LVs. I was planning on using product indicator (matched pairs) approach (e.g., Marsh, Wen, & Hau, 2004)  however I would prefer to use the Mplus (LMS) approach (based on Klein & Moosbrugger as you mentioned) because it is more straightforward and I don’t need to introduce/input ‘new’ standardized product variables to the data. Would it be possible to get your recommendation regarding the product indicator approach vs. Mplus approach to estimating interactions? Basically, I am looking for some statistical justification I can use for why Mplus approach is superior to indicator product method so I can proceed. Thank you very much. 


One statistical justification is that the Mplus approach is a maximumlikelihood method  a highly regarded estimator with good general properties  and the more ad hoc product indicator method isn't. I think, however, that the Marsh et al article suggests that the ML approach is a bit more sensitive to the normality assumption of the latent variables. 

Steve posted on Thursday, July 11, 2013  10:26 am



Dear Bengt, Thanks for your response. As your paper on Latent Variable Interactions at the end talks about the standardization of the interaction coefficient  may I ask if this is what Mplus provides in the STDYX output? Or in order to find the 'appropriate' standardized solution (e.g., Wen, March, & Hau, 2010), do you still need to multiply the Mplus standardized interaction coefficient by {sqrt[V(F1)*V(F2)]}/{sqrt[V(F1xF2)]} Thank you. 


Mplus does not provide a standardized solution in this case. You get the standardized values as described in the FAQ, Section 1.4. 

Steve posted on Thursday, July 11, 2013  3:06 pm



Okay. Thank you very much Bengt. 


We want to examine the interaction of two continuous latent variables (T and Tn) in prospectively predicting a categorical outcome using survival analysis. When we use the following syntax, along with the model=nocovariances statement (that is useful for other aspects of the larger model), the effect sizes for each predictor and for their interaction effect are all significant (p < .000), and range from .413 to 1.356. TxTn  T XWITH Tn; f on T; f on Tn; f on TxTn; However, when we include the correlation between the two predictors (i.e., we add the following statement to the above syntax: T with Tn;), all the effect sizes are reduced to 0.000, and are not significant (ps range from 0.997 to 1.000). That all three effect sizes are estimated to be 0.000 seems very odd. Any ideas why this might be happening? 


Please send the two outputs and your license number to support@statmodel.com. 

TA posted on Monday, March 03, 2014  8:53 am



Hi, Is there a way of producing a latent variable interaction graph, very much like the one you published in the article "Latent Variable Interactions" Bengt Muthen September 20, 2012 (https://www.statmodel.com/download/LV%20Interaction.pdf), page 9 using Mplus? I guess I was trying to interpret a latent variable interaction where one of the variables in the interaction is negatively correlated with the other, and then trying to interpret its relationship on the Y variable. Thanks. 


Yes, you can use the LOOP option that is described in UG ex 3.18. 

TA posted on Tuesday, March 04, 2014  1:02 pm



Will this work on a Mac? 


No, it will not. 

TA posted on Friday, March 07, 2014  10:10 am



Hi, Will I be able to a) run a latent variable interaction and b)plot the latent variable interaction using LOOP on older Mplus versions before 7. Thanks. 


No, the LOOP option was added in Version 7. 

TA posted on Sunday, March 16, 2014  8:30 pm



Hi, I was wondering if you could expand upon the example 3.18 to involve latent variables. The example is not helpful because it is between observed variables, not latent variables. This is my thought process of adapting the syntax. I would appreciate any input on getting this to work or even posting the syntax Dr. Bengt Muthen used to get the latent variable graph in the white paper. MODEL: emotional BY ITEM1 ITEM2 ITEM3 ITEM 4 ITEM5 ITEM6; k6 BY D1 D2 D3 D4 D5 D6; emotk6  k6_latent XWITH emotional; consult ON emotional k6_latent emotk6; The consult line is the model  is that what I include under model constraint? MODEL CONSTRAINT: PLOT(final_model) LOOP(mod, 2,2,0.1); final_model=consult*(emotk6*mod); PLOT: TYPE=PLOT2; Is this how the the syntax should be written? Thanks. 

TA posted on Sunday, March 16, 2014  8:44 pm



Or: MODEL: emotional BY ITEM1 ITEM2 ITEM3 ITEM 4 ITEM5 ITEM6 (gamma1); k6 BY D1 D2 D3 D4 D5 D6 (gamma2); emotk6  k6_latent XWITH emotional; consult ON emotional k6_latent emotk6 (b); The consult line is the model  is that what I include under model constraint? MODEL CONSTRAINT: PLOT(final_model) LOOP(mod, 2,2,0.1); final_model=b*(gamma1+gamma2*mod); PLOT: TYPE=PLOT2; My apologies for another post. This syntax ran and I wanted to make sure my syntax was correct for interpretation purposes. 


Please see the new FAQ Latent variable interaction LOOP plot at http://www.statmodel.com/faq.shtml 

TA posted on Friday, March 21, 2014  4:31 pm



Thank you, Dr Muthen. This is extremely helpful in comparison to my code. 

RuoShui posted on Monday, March 31, 2014  4:27 am



Dear Drs. Muthen, I am running a model with interactions between latent variables with continuous indicators. I have a couple of questions: 1) From reading previous posts, I understand that I can create the interaction term using two latent factors as they are without having to standardize any indicator, is this correct? 2) In the UG, it says "By specifying ALGORITHM=INTEGRATION, a maximum likelihood estimator with robust standard errors...." Does it mean that I do not have to specify Estimator=MLR if I want to account for potential nonnormal data? Thank you very much for your help! 


1. Yes. 2. I believe this is the case. Look at the output to see which estimator is used to be certain. 

RuoShui posted on Monday, March 31, 2014  2:48 pm



Thank you very much Dr. Muthen! 

TA posted on Friday, April 18, 2014  12:40 pm



I was curious to know if the interaction between two latent variables is computed in a similar fashion as Kenny and Judd (1984) paper? I guess I'm curious how the latent variable is computed exactly in Mplus. Thank you for your help as always. 


No, we use the LMS method described in the Klein and Moosbrugger article cited in the user's guide. 

Luo Wenshu posted on Monday, June 02, 2014  3:14 am



Dear Drs. Muthen, I am running SEM with latent interactions. I have two questions. 1) In a SEM model with latent interaction,do we need to centre the latent predi ctor factors to avoid multicollinearity when using the first order and interaction terms to predict an outcome latent variable? If so, how to do it? 2) My latent interaction model is more complex than the model in the manual. It has direct effects from the predictor factors and their interaction to the outcome factor, in addition to the indirect effect through an mediator factor. I also intend to control for two observed covariates in the model. Then how to calculate the standardized coefficients as well as R square? Thank you very much! 


1. No. 2. See the Latent Variable Interaction FAQ on the website. 

Luo Wenshu posted on Monday, June 02, 2014  5:18 pm



Thank you for your response, Linda. Is it appropriate to set the mean and variance of latent predictors to be 0 and 1 respectively in latent variable interaction model? I found that the regression coefficients would change if I do so. I have read the FAQ on latent variable interaction. So the formulas for standardized coefficients and R square are appropriate for my complex model where I have some observed covariates? Thank you so much. 


Q1. You can do so. Q2. The general formulas can be applied to your case, but doing so might require a degree of statistics knowledge. 

Luo Wenshu posted on Monday, June 02, 2014  6:16 pm



Thank you very much Dr. Muthen. After setting 0 and 1 as mean and variance for latent factors, can I assume that I can still apply the formula to the output in order to calculate standardized coefficients and R2? It seems that I need to be very careful about the calculation.I hope Mplus can provide the standardized coefficients and explained R2. 


Yes. At some point we plan to have this automated. 


Dear dr. Muthén, I ran a structural equation model using TYPE = COMPLEX RANDOM with a threeway interaction. Now that my interaction is significant, I try to plot my interaction using software by Dawson and Richter. However, to test simple slopes, I need the covariances between the interaction terms, which I cannot find in my output. I have used TECH1 and TECH3. Could it be the problem that I am using latent variables? What would you recommend to plot my interaction? Kind regards, Kim Breevaart 


It sounds like you are asking about a WITH statement between two XWITH parameters. That is not a model parameter. An XWITH parameter can be used only on the righthand side of an ON statement. 


Hi, I'm estimating a model with an interaction between a latent variable and observed variable. I would like to free the parameters of the first indicators. Is that acceptable in a latent interaction model? Thank you! f1 by T1* T2 T3 T4 T5; f1@1; [f1@0]; f2 by MB1* MB2 MB3; f2@1; [f2@0]; f3 by PER1* PER2 PER4 PER5 PER6 PER7 PER8; f3@1; [f3@0]; inter1  f1 XWITH salien; inter2  f3 XWITH salien; f3 on f1 f2 salien inter1 inter2; 


Yes. 

Back to top 