Message/Author 


Hello, I have a question about the latent interaction model estimated by Mplus. I have a latent variable interacting with an observed variable and I have missing data on the observed variable. When I run the model the sample size is reduced from 204 to 119. Is there a way to include all cases in the analysis? Also I standardized all of the variables in my model so that I can plot the interaction. Is that acceptable? Thank you for your help! 


Please send the output and license number to support. 


I have essentially the same question, so I would love to hear if you found a solution to the problem above. I have used the xwith command to estimate an interaction between an observed and a latent variable and I receive the following warning: "Data set contains cases with missing on variables used to define interactions. These cases were not included in the analysis.". If i do not include the interaction all cases are used. Is there a way to use all cases also in this situation? 


You can put a factor behind the observed variable, for example, XWITH  f1 with f2; f2 BY y; y@0; If you model requires numerical integration, say y@ .001. 


Hi Linda Thank you so much for your help! That worked perfectly. I had actually tried to do something similar but I did not know that i needed to add a small error variance to the second part of the interaction. If i do not do that, I receive this error message stating: THE ESTIMATED COVARIANCE MATRIX COULD NOT BE INVERTED. COMPUTATION COULD NOT BE COMPLETED IN ITERATION 1. CHANGE YOUR MODEL AND/OR STARTING VALUES. 


Yes, in some cases you cannot make the value exactly zero. 

ksk posted on Saturday, March 19, 2016  5:23 pm



Hello Dr. Muthen, I'm examining interactions between a latent variable and an observed variable. As you replied to Danielle Seay’s post, I treated the observed variable as a latent variable, as you see below: XWITH  f1 with f2; f2 BY y; y@.001 With this solution, I got the right sample size. But now I have other issues. First, should I treat the observed variable as a latent variable all the time? The observed variable alone is included as a predictor, along with the interaction term. So, there are three predictors: (1) Latent variable (2) Observed variable (3) Interaction between two latent variables (one of them was initially an observed variable) Now my issue: Should I treat the observed variable (Predictor 2) as a latent variable as well? Second, I have an outcome that is basically the same as the observed variable but measured later. Should I treat the output as a latent variable as well? Specifically, the observed variable used for the interaction is “Cognitive skills at Time 1.” The outcome is “Cognitive skills at Time 2.” I would include “Cognitive skills at Time 1” as a latent variable for the interaction term. But I was wondering whether I should treat the outcome “Cognitive skills at Time 2” as a latent variable as well. Thanks, Seulki Ku 


Once you have made y equal to f2, you should use f2 everywhere instead of y. Y should appear only in the BY statement where f2 is created. 

ksk posted on Monday, March 21, 2016  12:31 pm



Thanks for the response. For the second question, I think I wasn't clear enough. Could you please look the last three lines in the code below? F1, TSS1, CLS2, and TSS1xCL2 predict DCBO2. DCB01 and DCB02 are the same construct but different variables measured at different times. To make the analysis run with a right sample size, I treated DCBO1, observed variable, as a latent variable (see 3rd and 4th line). My question is whether I should make DCBO2 a latent variable as well as DCBO1 because DCBO2 is the same construct with DCBO1. ===================Code================= TSS1 by TCON1 TPER1 TAPP1; TSS2 by TCON2 TPER2 TAPP2; F1 by DCBO1; DCBO1@.001; TSS2 on TSS1 F1 CLS22; F1xCLS2 F1 XWITH CLS2; TSS2 on F1xCLS2; DCBO2 on F1 TSS1 CLS2; DCBO2 on TSS1xCLS2; TSS1xCLS2  TSS1 XWITH CLS2; ======================================== Thank you! Seulki Ku 


When you put a latent variable behind a observed variable with a residual variance of zero, you make the latent variable equal to the observed variable. It does not matter which one you use in the analysis, the results will be the same. So you can put a latent variable behind it but you don't need to. 

ksk posted on Tuesday, March 22, 2016  8:50 am



Dr. Muthen, That's clear thank you! Now I have a question about how to plot the interaction between a latent variable and an observed variable. As shown in the code below, CLS2, observed variable, is a moderator. I checked the mplus User Guide and found "Latent variable interaction LOOP plot." I was wondering whether this is also applied to plotting the interaction between a latent and observed variable. If not, how can I plot the interactions for my analysis? ===================Code================= TSS1 by TCON1 TPER1 TAPP1; TSS2 by TCON2 TPER2 TAPP2; F1 by DCBO1; DCBO1@.001; TSS2 on TSS1 F1 CLS22; F1xCLS2 F1 XWITH CLS2; TSS2 on F1xCLS2; DCBO2 on F1 TSS1 CLS2; DCBO2 on TSS1xCLS2; TSS1xCLS2  TSS1 XWITH CLS2; ======================================== Thank you! Seulki Ku 


In your case you can still apply the ideas in the FAQ on our website: Latent variable interaction LOOP plot 

ksk posted on Sunday, March 27, 2016  9:38 am



Dr. Muthen, Thanks for answering my question. I used the Latent variable interaction LOOP plot to plot the interactions. In the plot, I got two lines for low F2 and high F2 (F2 is a moderator). After the plotting, how could I know which line is significant? Should I create two variables, high F2 and low F2 and then conduct separate regression analyses with each variable? Thanks, Seulki Ku 


You should express the lines, or the parts thereof that you are interested in testing significance for, in Model Constraint without LOOP or PLOT and then in the New/Additional part of the output you see what's significant. 

Back to top 