Message/Author 

Sun Kim posted on Wednesday, April 11, 2012  12:13 am



Dear Drs. Muthen, I am trying to test some interactions in an SEM model where type= complex and my indicators are categorical (WLSMV estimator), with indirect effects (model indirect). I have two questions: (1) Can I test interactions between two continuous latent variables (but with categorical indicators)? I couldn't find how to do test for interactions using WLSMV estimator, since only ML estimation is allowed with the specification "type= random," which is shown to be used in the User Guide. Furthermore, it seems I cannot test for interactions using categorical indicators as this returns and ERROR message. (2) How can I compare the interaction results to the full model using loglikelihood, since I cannot fit interactions and indirect paths at the same time? Thank you so much for your time, as always. Regards, Sun 


To test a latent variable interaction you must use maximum likelihood estimation. You can do this when the factor has categorical factor indicators. I don't know what error you received so I can't comment on that. When you cannot use MODEL INDIRECT for indirect effects, you can instead use MODEL CONSTRAINT. 

Sun Kim posted on Thursday, April 12, 2012  4:57 pm



Dear Dr. Muthen, Thank you so much for your response. I think the problem is that my model is a complex model with individuallevel weights. In the variable command, I have categorical indicators with: cluster = coupleID; weight is CH02PRWT; Then, in the Analysis command, I have: Analysis: Type= complex ; estimator= ML; So I get the warning message: *** WARNING in ANALYSIS command Estimator ML is only allowed with TYPE=COMPLEX and replicate weights. Default estimator will be used. Thank you. Regards, Sun 


We don't allow weights with ML because with weights the standard errors are not ML. Use MLR or another maximum likelihood estimator when you have weights. 

Sun Kim posted on Friday, April 13, 2012  8:27 am



Dear Dr. Muthen, I did that, but I still had problems fitting the model. Also, I am noticing that I am not getting any of the fit indices. Is this normal? Here is a simplified version of my command (just three latent variables that serve as mediators): Categorical are sch1d sch23d sch45d sch6d sch7d sch8d hom2d ac1d ac2d; cluster = coupleID; weight is CH02PRWT; Analysis: Type= complex ; estimator= MLR; Model: schoolF by sch1d sch23d sch45d sch6d sch7d sch8d ; homeF by hom1d hom2d hom3d hom4d; acF by ac2d ac1d; Thank you! Regards, Sun 


You will not get chisquare and related fit statistics with maximum likelihood and categorical outcomes. This is because means, variances, and covariances are not sufficient statistics for model estimation. 

Sun Kim posted on Friday, April 13, 2012  8:43 am



Dear Dr. Muthen, Thank you so much for your quick response. In such case, can I just report those I got with the WLSMV estimator? Since I really need to use maximum likelihood estimator because I want to test for interactions, I am thinking of reporting the WLSMV estimator fit statistics at each step in my paper, then in the final test of interaction, use MLR. How would I justify this, and do you think this is acceptable? I saw in a previous post "You can also use MLR and create your own unrestricted covariance matrix model in Mplus to test against, that is do a second run, and then compute chisquare as 2 times the log likelihood difference." However, this still does not give the CFI, RMSEA and TLI values I would like. Thank you! Regards, Sun 

Sun Kim posted on Friday, April 13, 2012  8:46 am



By the way, I forgot to add that in my mediation model, my final outcomes are not categorical they are continuous, but my mediators and predictors have some categorical indicators. Also, the model I posted is just a 3factor CFA (no outcomes or predictors). 


You cannot use WLSMV fit indices with ML results. If you must have these fit indices, you must use WLSMV for fit and results. 

Sun Kim posted on Friday, April 13, 2012  10:02 am



Dear Dr. Muthen, So I understand from your responses that at this stage, using Mplus version 6, it is impossible for me to be estimating interactions in my case (categorical indicators with weights and type= complex model) and get fit indices at the same time. Thank you! Regards, Sun 


It is the case that when means, variances, and covariances are not sufficient statistics for model estimation, chisquare and related statistics cannot be computed because they have not been developed for other situations. 

Sun Kim posted on Saturday, April 14, 2012  12:02 pm



Dear Dr. Muthen, Oh, I see. Thank you very much for your kind responses, always very helpful. Regards, Sun 


Hello, I am using Mplus Version 7. I have been unable to estimate a model with an interaction between a latent variable (with categorical indicators) and dummy variable using estimator = WLSMV. Based on the thread above, I am not sure if estimating this interaction is possible or if need to use a different estimator. Thank you for your help. 


The XWITH option for latent variable interactions is not available with WLSMV. You can use MLR for this. See Example 5.13. 


Thank you for your help. I hope you could clarify if by taking this approach I would be treating the categorical indicators as continuous? Presently, all my latent factor indicators are ordinal (4 reponse options), but this example is with continuous indicators. 


No, using XWITH involving a factor does not imply any statement about the indicators of that factor. Note also that an interaction between a latent variable and an observed dummy variable could be analyzed as a multipegroup model. 

burak aydin posted on Thursday, December 15, 2016  5:58 pm



Hi, We are interested in using latent means in a multilevel framework. Our model is given below and we are suspicious about the results. Our question is; Does our code correctly test the interaction of the treatment indicator (01) and the level1 and level2 components of the latent decomposition of X? If not, is there a way to test these interactions in Mplus? usevariables = cid2 y trt schid x x2 int; CLUSTER = schid cid2; BETWEEN =(cid2) trt; Define: int = trt*x; ANALYSIS: TYPE = THREELEVEL RANDOM; MODEL: %WITHIN% y ON x x2 int; x x2 int; %BETWEEN cid2% s2  y ON trt; y ON x x2 int; x x2 int; %BETWEEN schid% y ON x x2 int@0; y with s2; x x2 int; 


Your statement int=trt*x does not split the interaction according to the 2 levels of x. Instead, do a 2group analysis based on trt. This way you have more modeling flexibility. 

burak aydin posted on Friday, December 16, 2016  5:44 pm



Thank you very much. Your recommendation is actually our starting point. We wanted to compare these two models. Should I take your answer as "not yet possible" if we want to use a threelevel model with latent decomposition by treatment indicator interactions? 


Right. 


Dear Drs. Muthen, I am trying to model an interaction between 2 latent variables, however, I keep receiving the following error message: *** ERROR in MODEL command To declare interaction variables, TYPE = RANDOM must be specified in the ANALYSIS command. However, the current dataset is survey data and to my understanding must be run using the Cluster and stratification commands, which require type=complex Is there any way to run an interaction using type=complex, and/or maintaining the integrity of the survey data? Thank you in advance for your help! Here is a sample of some of my input file: Cluster = PSUSCID; Stratification is region; Weight = gswgt3_2; Analysis: Type = complex; estimator = wlsmv; Model: !Measurement; EEMom by var1 var2 var3 var4 var5; EEDad by var6 var7 var8 var9; ! Create latent interactions EEMomEEDad  EEMom XWITH EEDad; !Structure; MentorA1 on EEMom (b1); MentorA1 on EEDad (b2); MentorA1 on EEMomEEDad (b3); 


Try Type = Complex Random. 

Back to top 