Interaction
Message/Author
 Anonymous posted on Wednesday, October 27, 2004 - 10:46 am
I have a latent continous construct with indicators i treat as categorical (f1 by ...). I would like to examine "interactions" of variables like "education" with a variable "region" (binary: 0 and 1. Is it important if "region" is 0-1 or 1-2 for checking the effect?) In the syntax, i have:
...
Usevariables:...xed (the regressor);
...
Define: xed=x1(region)*x3(education);
...
Model: f1 by y1-y4;
f1 on x1 x3 xed;

I´m wondering whether this is everything to check the interaction?

Another question is: if i check the main effect of x1 on f1 without the other variable, by modeling: f1 on x1; I get an expected "positive" effect. If i do the model in the interaction, the main effect f1 on x1; suddenly becomes negative. Can you imagine why this can be the case?

Last question: How can i manage it if i have a second latent construct with categorical indicators (f2 by...), and want to check the interaction between f2 and x1 in predicting f1? Is there something special to do in handling f2 in the syntax?

Thank you very much.
 Linda K. Muthen posted on Thursday, October 28, 2004 - 9:03 am
I think it is most common and easier to interpret when both variables are coded 0/1. The issues here are the same as coding issues in regular regression.

If you have a significant interaction, the main effect needs to be interpreted with the interaction. The main effect alone should not be interpreted when there is a significant interaction.

You would use the XWITH command for an interaction between an observed and latent variable.
 Anonymous posted on Friday, October 29, 2004 - 3:40 am
May be you can tell me something about the usage of this XWITH command?
So i do not use the Define Command as i do for other interactions, and say:
Define: xint=x1*f2;?
How do i prepare (transform) my latent variable (f2 by y1 y2 y3;) for an interaction with x1? So that it is possible to see if their is an interaction effect on the other latent variable?Like: f1 on x1 f2 xint;

If i code x1 (0-1) the effects are the same as for code (1-2). Is this possible and just for the easier interpretation to use code 0-1, or is there something wrong?

Thank you
 Linda K. Muthen posted on Friday, October 29, 2004 - 6:58 am
Regarding XWITH, I suggest reading what is in the Mplus User's Guide. There is a table that shows various types of interactions. DEFINE is not used for interactions unless both variables are observed.

Regarding coding, I suggest going to a regression text to read about the various types of coding available. Coding issues are the same as in regular regression.
 Anonymous posted on Monday, November 01, 2004 - 8:37 pm
I was playing around with my new MPlus Version 3.1 software and successfully ran a structural model with an interaction term (two continuous latent variables). However, I noted that the output did not include general fit statistics such as RMSEA, SRMR CFI, etc. - only the comparative fit statistics (BIC, etc.).

Am I doing something wrong here? I had my Output command set at STANDARDIZED and SAMPSTAT, as I had in my previous model without the interaction.

Thanks.
 bmuthen posted on Monday, November 01, 2004 - 8:55 pm
The lack of overall model fit statistics with latent variable interactions in Mplus is due to the fact that they haven't been invented yet. For example, it is not clear what the "unrestricted model" should be in this case. In regular SEM models you have an unrestricted covariance matrix as H1. But this is only because regular models concern covariance matrix fitting which this is not the case with interactions since they give rise to non-normal outcomes where sample covariance matrices are not sufficient statistics. There is however work at the research frontier on developing fit statistics, but it is not here yet. In the meanwhile we have to do what statisticians mostly do, namely compare adjacent nested models using loglikelihood difference chi-square tests.
 Anonymous posted on Tuesday, November 02, 2004 - 10:42 am
I did what Linda K. Muthen wrote at Oct. 28. 9:03: I used the XWITH command to check the interaction between x1(region) and the latent construct in ma one-group model. In the analysis command only Type is Random seems to be possible? So Standardized and Residual are not available. Is there any way to get these values? In the Tests of Model Fit there is a Loglikelihood H0 Value and some Information Criteria. ..How do i interpret these values and see whether the model is "fit" or not?
 bmuthen posted on Tuesday, November 02, 2004 - 12:05 pm
See my answer above (Monday, Mov 01, 2004 - 8:55pm) - these matters are not yet resolved. Also read the Klein-Moosbrugger(2000) Psychometrika article and the Marsh et al (2004) Psych Methods article.
 Anonymous posted on Tuesday, November 02, 2004 - 2:14 pm
Thank you for the articles. I noticed your answer from Nov.01-20004 8:55 but ask myself how to "compare adjacent nested models using loglikelihood difference chi-square test".
 Linda K. Muthen posted on Tuesday, November 02, 2004 - 2:53 pm
-2 times the loglikelihood difference is distributed as chi-square.
 Anonymous posted on Friday, November 05, 2004 - 2:05 am
I have a question to the example from Oct.27-10:46am. if i want to check the interaction between education and region and want to use for example 'age' as control-variable, should i define the effect also in interaction with region or only model its 'main effect' on f1?
So:
DEFINE: xed=x1*x3;
MODEL: f1 by y1-y4;
f1 on x1 x3 x4(age) xed;

or:
DEFINE: xage=x1*x4; xed=x1*x3;
MODEL: f1 by y1-y4;
f1 on x1 x3 x4 xed xage;

to control 'age' in examining the interaction: education and region

THANK YOU
 LMuthen posted on Friday, November 05, 2004 - 7:47 am
I would run the model with the age interaction and include it if it is significant. There is really no rule that I know of. In ANOVA, all interactions are automatically examined.
 Anonymous posted on Sunday, November 07, 2004 - 10:00 am
I tried to compute the the effect on f1(y1-y4) of the interaction from the latent construct f2(y5-y7) with x1. Without control variables it was ok. like in my message from Nov.2. The computation takes much longer than other models. If i want to use control-variables my Model is:
MODEL: f1 by y1 y2 y3 y5;
f2 by y9 y10 y11;
f2 on x1 x4 x15;
f1 on x1 x4 x15 f2;
x1xf2 | x1 XWITH f2;
f1 on x1xf2;
First it is shown that INPUT IS TERMINATED NORMALLY. But after the categories of the variables y1-y7 an ERROR appears:

THE MODEL ESTIMATION DID NOT TERMINATE NORMALLY DUE TO A NON-ZERO DERIVATIVE OF THE OBSERVED-DATA LOGLIKELIHOOD.

CONVERGENCE CRITERION FOR THE LATENT VARIABLE MIXTURE MODEL IS NOT FULFILLED. CHECK YOUR STARTING VALUES OR INCREASE THE NUMBER OF MITERATIONS. ESTIMATES CANNOT BE TRUSTED. THE LOGLIKELIHOOD DERIVATIVE FOR PARAMETER 1 IS -0.86936334D-01.

1. Can you imagine what is wrong here?
2. Is it possible to examine the model in another way and not in a mixture model?

Thank you.
 Anonymous posted on Monday, November 08, 2004 - 4:24 am
If i examine an interaction with an involved latent variable and i treat the indicators of the latent variable as categorical, in the XWITH command with Type is Random the Estimator is MLR. Does MPlus nevertheless computes the model with the indicators treated as categorical? I tried to change the Estimator in WLSMV, but it does not work.

Thank you
 Anonymous posted on Monday, November 08, 2004 - 9:42 am
I've a question to the example of Nov.05=> 2:05am:
How should i treat a mediator f2 with y5-y7 (treated as categorical) in predicting f1:

Should the interactions xed and xage also run on this construct or only the variables x3 and x4?
So,
MODEL: f1 by y1-y4; f2 by y5-y7;
f2 on x1 x3 x4 xage xed;
x1xf2 | x1 XWITH f2;
f1 on x1 x3 x4 xage xed f2 x1xf2;

Or without xage and xed on f2?
 bmuthen posted on Sunday, November 14, 2004 - 11:38 am
Answer to Nov 08 - 04:24am.

Yes, the indicators will be treated as categorical here. Type = random is only available with ML estimators, not WLS estimators.
 bmuthen posted on Sunday, November 14, 2004 - 11:41 am
Answer to Nov 08 - 09:42.

This is a substantive choice in the modeling that you have to decide, not a choice ruled by statistics. Try it both ways.
 Anonymous posted on Monday, November 15, 2004 - 5:07 am
Thank you very much for your help. Do you have any suggestions to solve the problem described on Nov 07 - 10:00?
 bmuthen posted on Monday, November 15, 2004 - 7:08 am
The problem described in the question of Nov 07-10:00 indicates that the estimate of parameter number 1 is hard to determine in the sense that a solution has not been found within the default number of iterations (derivatives are zero at the solution). You should check which parameter this is by looking at Tech1. You should also see what the parameter's value is when the iterations stopped - this might indicate that the parameter is moving towards an extreme value. The outcome you describe is often an indication that the model should be respecified with respect to this parameter.
 Anonymous posted on Tuesday, November 16, 2004 - 9:12 am
ANALYSIS:
TYPE IS RANDOM;
MODEL: f1 by y1* y2@1 y3 y5;
f2 by y9 y10 y11;
f2 on x1 x4 x15;
f1 on x1 x4 x15 f2;
x1xf2 | x1 XWITH f2;
f1 on x1xf2;
OUTPUT: TECH1

The errors that appeared were:

THE LOGLIKELIHOOD DECREASED IN THE LAST EM ITERATION. CHANGE YOUR MODEL,STARTING VALUES AND/OR THE NUMBER OF INTEGRATION POINTS.

THE MODEL ESTIMATION DID NOT TERMINATE NORMALLY DUE TO AN ERROR IN THE COMPUTATION. CHANGE YOUR MODEL AND/OR STARTING VALUES.

What i tried after that was to give starting values to the indicators. I used the loading from the construct-validation. But it appears the problem described Nov.07-10:00,with different parameters, dependent on which loading is fixed. What i do not really understand is why it computes an interaction-effect x1 XWITH f2, if there are no other variables (like x4 or x15...)...

I am really thankful for any advise.
 Linda K. Muthen posted on Tuesday, November 16, 2004 - 10:20 am
It sounds like you should send your input, output, and data to support@statmodel.com.
 Anonymous posted on Wednesday, November 17, 2004 - 10:38 am
Thank you for the supply to send my input etc. But with my last try i take new hope (maybe at some time i gonna come back to your offer).
My last try was to include the interactions of x4 (xed=x1*x4) and x15(xage=x1*x15) into the model even though i expected problems cause without this interactions the errors from Nov-7 appeared. So my syntax was:
(...)
DEFINE: xsbr=x1*x4; xal=x1*x14;
ANALYSIS:
TYPE IS RANDOM;
MODEL: f1 by y1 y2 y3 y5;
f2 by y9 y10 y11;
x1xf2 | x1 XWITH f2;
f1 on x1 x4 x15 f2 xed xage x1xf2;
f2 on x1 x4 x14 xed xal;

OUTPUT: TECH1 TECH8

With this syntax an output appeared. But because i do a one-group analysis with interactions with x1, it would be better for an interpretation to get the standardized coefficients. With the inclusion of x1xf2 however only Type is Random (and no standadized Output) is possible. How can i use the unstandardized effects for an interpretation?

Thank you once again for your help and in total for your the discussion area with many helpful informations.
 bmuthen posted on Wednesday, November 17, 2004 - 3:21 pm
I think the unstandardized coefficients are easily interpretable in line with regular linear regression: "for a one-unit change in x, the coefficient tells us how much y changes". This is an interpretation that is convenient when expressing the interaction results in terms of "moderator effects" - see our Day 5 handout and the example of interactions in math growth analysis.

You can also yourself standardize the coefficients. It is for example convenient to standardize with respect to the exogenous variables which as in regular regression means that we multiply a coefficient by the standard deviation of the exogenous variable in question. In this case, a unit change in the exogenous variable is a 1 SD change in the exogenous variable which is perhaps more readily interpretable.
 Anonymous posted on Monday, November 22, 2004 - 6:20 pm
I tried to estimate an interaction model:
f1 by y*1@1;
(y*1 is a single categorical variable and I am fixing its value for identification)

f1@0;

f1 on x1 x2 x3 x4;

int | f1 xwith w1;

y2 on f1 w1 int w2 w3 w4;

I used TYPE = RANDOM since the program seems to require that statment. y*1 is set to categorical in the DATA section.

I tried to define int = f1*w1 in the DEFINE section, but since f1 is calculated it would not work. The error message I received was:

"An interaction variable defined using XWITH must be used at least once on the right-hand side of an ON statement that is not part of a | statement. No valid reference of: INT." I thought I had done this on my last line. Am I doing something wrong in setting up this model?
 Linda K. Muthen posted on Monday, November 22, 2004 - 6:33 pm
The interaction variable for the interaction between f1 and w1 is int. You have not include in as a covariate. You should have something like:

y2 on f1 w1 int w2 w3 w4 int;

I don't think the error message came from DEFINE but from not using int.
 Anonymous posted on Tuesday, November 23, 2004 - 3:53 am
Suggestion to the problem of Nov-22 6:20pm:

I don't really no whether this is a good suggestion, but what you can also try is:
f1xw1 | f1 XWITH w1;
y2 on f1 w1 f1xw1 w2 w3 w4;

May be Linda or Bengt Muthen can tell you whether this might work. Or when it is wrong, why?
 Linda K. Muthen posted on Tuesday, November 23, 2004 - 6:40 am
I think it is the same thing as I posted. You named the interaction f1xw1 and he had named it int.
 Anonymous posted on Tuesday, November 23, 2004 - 4:13 pm
Thank you for the suggestions. I don't see how putting int in the second equation twice (y2 on f1 w1 int w2 w3 w4 int). Even if I get rid of the first stage equation (f1 on x1 x2 x3 x4) and just run the model with the single variable latent variable interacted with the observed continuous variable, I still receive the same error message. I must be setting up the problem incorrectly, but I just don't see where.
 Linda K. Muthen posted on Tuesday, November 23, 2004 - 5:07 pm
It sounds like you need to send your output to support@statmodel.com so I can see exactly what you are doing.
 Linda K. Muthen posted on Wednesday, November 24, 2004 - 9:40 am
You have int on your USEV list. This list is for observed variables in the analysis. When you form an interaction between a latent and observed variable, it is not an observed variable. DEFINE can only be used to create interactions between observed variables.
 Anonymous posted on Friday, November 26, 2004 - 8:00 am
What do you think about trying to have interaction variables in the Data? So what i did was: I have the variables like example Nov-7. f1(y1-y4) and f2(y5-y7), the variable x1(region) and i build interaction variables(x1 with the variables of f2) which are aleady in the data: y8=x1*y5, y9=x1*y6 and y10=x1*y7. With the other interactions from Nov-17(xed=x1*x4 and xage=x1*x14) i have the model:
MODEL:
f1 by y1-y4;
f2 by y5-y7;
f3 by y8-y10;
f2 on x1 x4 x14 xed xage;
f1 on x1 x4 x14 xed xage f2 f3;

OUTPUT: TECH1 TECH8

The computed values are not that much different and significant are the same effects as when i did:

x1xf2 | x1 XWITH f2; (instead of having f3 now).

The difference is mainly: 1. that it was possible to take other variables into the model with the f3 way and 2. in the elapsed time for the computation: with x1xf2=> nearly 7min; with f3=> nearly 2hours

Is this nevertheless an alternative in computing interactions between an observed and a latent variable?
 Linda K. Muthen posted on Friday, November 26, 2004 - 9:32 am
This is an ad hoc approach. The problem with it is that there will be estimation errors as in any stepwise procedure, but you will not know how well it works in any given case without comparing it to the one step approach.
 Anonymous posted on Friday, November 26, 2004 - 10:12 am
Thank you for your response. My conclusion is that it does not make sense to compute a model with such an approach that does not work with the one step approach (which seems the XWITH one). And if you have to compute every time also with the one step approach ,the ad hoc one seems to be senseless.
 Anonymous posted on Thursday, December 02, 2004 - 3:42 am
If i look to my output, i have a negative effect of x2(coded 1-6) on f1, a positive effect of x1(coded 0-1) on f1 and a negative interaction effect x1*x2 on f1.
1. Can i say that the negative effect of x2 on f1 is the effect if x1=0?
2. Is the interaction effect to interpret that way, that the negative effect of x2 on f1 becomes stronger if x1 changes to 1? Namely +(interaction effect*x1 effect)?
 bmuthen posted on Thursday, December 02, 2004 - 8:17 am
A useful way to interpret interaction is by a "moderator" approach. In your case you would write your equation

f1 = b1*x1 + b2*x2 + b3*x1*x2

as

f1 = b1*x1 + (b2 + b3*x1)*x2

where you have b2 < 0 and b3 < 0. This is written to indicate that x1 moderates the influence of x2 on f1.

This shows that if x1=0, b2 is the effect of x2 on f1 as you say. So yes on your question 1 and yes also on your question 2.
 Anonymous posted on Friday, December 10, 2004 - 1:37 am
At Oct.28, Linda K. Muthen wrote that a main effect should not be interpreted if there is no significant interaction...

What can be done if we say, the "main" effect seems to be an effect at a special point, let`s say (if we take the example from Dec.02) the effect if x1=0.

Is it not possible to say, if this effect is significant but there is no significant interaction (x1 changes to 1), that the effect is independent from x1 and can be interpreted regarding this independence?
 Linda K. Muthen posted on Friday, December 10, 2004 - 6:31 am
I wrote that the main effect should not be interpreted is there is a significant interaction. See below:

"If you have a significant interaction, the main effect needs to be interpreted with the interaction. The main effect alone should not be interpreted when there is a significant interaction."

If there is no significant interaction, then the main effect can be interpreted alone.
 Anonymous posted on Friday, December 10, 2004 - 8:11 am
Oh sorry, it seems that i have to improve my abilities in reading...

In such a case that the interaction is not significant. Do you see a problem in exclude it in a next model?
 Linda K. Muthen posted on Friday, December 10, 2004 - 9:08 am
Some people would take it out to make the model more parsimonious. Others would not. I probably would not.
 Anonymous posted on Sunday, March 20, 2005 - 9:15 pm
Dear Prof. Muthen

I have been using Mplus 3.1 for fitting some SEM models with latent interaction. As you posted
in Mplus discussion list before, there is no
goodness-of-fit measure for evaulating the interaction model itself, due to the lack of "unrestricted model". This is the approach without creating indicators for the latent interaction term. However, in the literature, there are other tedious approaches for fitting latent interaction models which require creating indicators for the latent interaction term and many parameter constraints (including Kenny and Judd appraoch, and the recent by Marsh et al. (2004 in Psychological methods, vol 9(3), 275-300). If we use these alternative approaches to fit interaction models, we can now obtain chi-square, RMSEA, CFI, etc. goodness-of-fit measure. Are these GOF measures valid? Did I miss some important link here?
I am confused which approaches we should take...

I appreciate if you can help me to resolve this issue. Thanks a lot.
 bmuthen posted on Monday, March 21, 2005 - 7:51 am
Good question. I am not sure we fully know the value of those fit indices when using these less efficient methods for lv interaction modeling. And, I think we could develop fit indices for the lv interaction modeling by ML that is used in Mplus. But until then, I think the best way to proceed is to do what is usually done in statistics - work with a series of nested models, looking at their log likelihood differences (2* logL diff is chi-square distributed). For instance, you can look at the regular fit indices for the model without interactions. Then you can look at the logL difference with the model where you add the interaction.
 Anonymous posted on Monday, March 21, 2005 - 2:22 pm
Hi Prof. Muthen

Thank you for your comments. I have one follow-up question. I can see we can perform the log-likelihood difference test between interaction
model and without-interaction model using the approach in Mplus (no indicator created).

For the other tedious approaches, we need to create product indicators for the latent interaction term, so the dimension of var-cov matrix increases (comparing to the model without interaction where we don't include the product indicators). In this case,
can I compare the models by likelihood-hood ratio test, AIC or BIC (the var-cov matrices are different between the interaction vs. "main effects" models-- are they nested models )?

 bmuthen posted on Monday, March 21, 2005 - 5:41 pm
The likelihood ratio test or AIC/BIC are not applicable for the "tedious approaches" since they do not give ML solutions.
 Anonymous posted on Wednesday, June 08, 2005 - 12:17 pm
Hello. I am following your advice and am comparing two nested models using the log likelihood difference test. One question...I need the degrees of freedom for both models to calculate whether the chi-square is significant. However, I do not see the df's printed anywhere in the output. Can I just use the difference in the number of free parameters given in the output?

Thanks.
 Linda K. Muthen posted on Wednesday, June 08, 2005 - 6:17 pm
Yes, this would be the same thing.
 Anonymous posted on Thursday, July 07, 2005 - 9:07 pm
Dr. Muthen:

The path diagram for an SEM with an interaction between two continuous latent variables (example 5.13 in the user's guide) is different from examples of continuous latent variable interactions presented in other texts. Typically, the interaction is presented as an additional latent variable, whereas in your example it is represented only by an additional pathway stemming from the two main effects. This implies that a residual variance is not estimated for the interaction term. Similarly, the covariance of the interaction term with its constituent main effects is not estimated.

If I am estimating an SEM that includes an interaction between a latent exogenous variable and a latent endogenous variable, how should I label the interaction in the path diagram? I am using LISREL notation. It seems to me that I cannot label the interaction as "beta" or "gamma" since the interaction involves both endogenous and exogenous variables. I have thought of using something like iota_a,b.c, where "a" is a subscript denoting the enogenous variable influenced by the interaction and "b" and "c" are subsripts denoting the interacting variables. Does this sound reasonable, or do you have any other suggestions?
 Linda K. Muthen posted on Friday, July 08, 2005 - 8:36 am
Because it involves an endogenous variable, I would think of it as endogenous, therefore beta, although what you call it doesn't really matter as long as you make it clear what your notation means.
 Anonymous posted on Wednesday, July 20, 2005 - 2:16 pm
Dr. Muthen:

Thanks for your previous response (July 08, 2005 - 8:36 am). That was very helpful.

One further question regarding Klein and Moosbrugger's LMS approach for handling interactions involving latent variables. As I mentioned in my previous post, the interaction example in the Mplus User's Guide suggests that a residual variance is not estimated for the interaction term and that the covariance of the interaction term with each of its constituent main effects is similarly not estimated. This is consistent with discussions I have read on the LMS method. Is there a particular reason why the residual variance and covariances are not estimated? I may be wrong, but I thought that the Joreskog and Yang approach for interactions involved the estimation of these parameters.

I am not interested in the residual variance or covariances; however, I want to make sure that I am performing the estimation correctly. Klein and Moosbrugger used the Kenny-Judd model as an application, which involved an interaction between two latent exogenous variables. In my case, however, the interaction is between a latent exogenous variable and a latent endogenous variable. I do not believe that this should make any differemce, though I am uncertain.
 bmuthen posted on Wednesday, July 20, 2005 - 2:46 pm
That's right, with ML the latent variable interaction term does not introduce a mean, variance or covariance with other variables - only a regression slope. This is because the interaction is not a new, distinct variable, but merely the product of two existing latent variables. With other non-ML approaches, such as the Joreskog-Yang approach, the interaction is instead seen as a new variable, but that is due to the JY approach drawing on information from observed product variables; in contrast, the ML approach does not change the original set of observed variables.
 Michael Lorber posted on Saturday, October 08, 2005 - 1:26 pm
Dear Mplus architects:

Does Mplus include some sort of graphing capability that would allow one to visually depict a latent variable interaction?

I suppose one could use factor scores and depict the interaction in typical ways, but this doesn't seem like that great a method given that it won't really show the same relations as will latent variables. Plus it's a problem when using FIML estimation with missing values b/c many subjects would not have observed data to form factor scores from.

 bmuthen posted on Saturday, October 08, 2005 - 1:57 pm
No, Mplus doesn't have a graphing capability for interactions. I agree that using factor scores would not be the best way to go. I would use the estimates from the interaction model to compute the effects of the key independent variable on the dependent variable when the moderator (the variable that the independent variable is interacting with) is at its mean and below and above the mean (say 1 SD) - this can also be graphed, outside Mplus.
 Anonymous posted on Thursday, December 01, 2005 - 9:25 am
Dear Mplus folks:

What would you make of the following situation?

A model with two latent predictors and their interaction (entered simultaneously) has an interaction term that is tiny and way short of conventional significance.

However, when the above model with the interaction term is compared to a model where the path from the interaction to the DV is constrained to zero, the comparison of the two models (via the 2* logL diff method; 1df) yields an easily significant difference.

Reflecting the small interaction term, the plot using

f1 = b1*x1 + (b2 + b3*x1)*x2

modeled at high, med, and low values of x1 and x2 does not suggest interaction.

It doesn't appear to me that there's an interaction, but the model is happier with the interaction term in. I'm not sure what this means.

Thank you.
 Linda K. Muthen posted on Friday, December 02, 2005 - 7:14 am
Please send the two outputs along with your license number to support@statmodel.com so we can see exactly what you are seeing.
 Natalia Letki posted on Thursday, December 08, 2005 - 2:11 pm
When i'm trying to define an interaction term between a latent and an observed variable: inter | div XWITH n_stat;

and use it as a predictor:
att_b ON sociab_b n_stat div inter;

i get the following error message:
*** ERROR in Model command
Unknown variable(s) in an ON statement: INTER

I would be grateful for your suggestions as to what i'm doing wrong? Thank you.
 Linda K. Muthen posted on Thursday, December 08, 2005 - 2:19 pm
 matt diemer posted on Thursday, December 22, 2005 - 8:48 am
I was interested in modeling interactions between four latent variables, using complex sample data and about 15 total indicators. [I'm still learning exactly how to do this.]

About how long should I expect MPlus to finish running the analyses? I've had a few tries of 2-3 hours without terminating and have had to stop the program myself.

How long should I expect this to take?
 bmuthen posted on Thursday, December 22, 2005 - 8:55 am
If you have 4 latent variables interacting, you can end up with 6 pairwise interaction variables (I assume you don't mean a 4-way interaction). This is a very demanding tasks computationally. I would start with doing only one pair at a time and see if the interaction has significant effects. You should request Tech8 which gives you screen output showing how many dimensions of integration you have. With 3 or more dimensions, I would use integration = montecarlo. The Tech8 screen output will tell you how slowly the computations are proceeding.
 David Bard posted on Sunday, October 01, 2006 - 8:12 pm
I'm running a monte carlo study for a GE interaction twin model with ACE VC's and manifest environmental (X) variables (uncorrelated with one another and all VCs). I've tried numerous approaches, 2 shown below. I get 1 of 2 error messages. Most often: Cov matrix not pos def...; but occassionally: reciprocal interaction. All models are nonlinear regression equations, but the corr A and C terms wreak havoc. I could simulate the cov matrix of the phenotype alone, but the estimates for the full regression model are easier to guess at than this cov matrix (how compute corr between main effect A and GE int term?). Can you help?
 David Bard posted on Sunday, October 01, 2006 - 8:14 pm
Syntax for above:
1 approach might be:
MODEL POPULATION:
A1 by y1*.32 (a);A2 by y2*.32 (a);C1 by y1*.63 (c);C2 by y2*.63 (c);E1 by y1*.71 (e);E2 by y2*.71 (e);
A1-E2@1; [A1-E2@0];A1 with A2@1;C1 with C2@1;A1 with C1-E2@0;A2 with C1-E2@0;C1 with E1-E2@0;C2 with E1-E2@0;E1 with E2@0;
X1-X2*1 (vx);[X1-X2*0] (mx);X1 with A1-E2@0;X2 with A1-E2@0;X1 with X2*0 (cx1);
A1X | A1 xwith X1; A2X | A2 xwith X2;
Y1 on X1*.5 (r1) !Main effect of X1;
A1X*.05 (ax); !Interaction effect
Y2 on X2*.5 (r1)
A2X*.05 (ax);
Y1-Y2@0.0001;[Y1-Y2*0] (my);
Model Population-g2: A1 with A2@.5;
2nd approach (no xwith) changing the regression:
Y1 on X1@0;s1 | Y1 on X1;s1 on A1*.05; s1@0;[s1*.5];Y2 on X2@0;s2 | Y2 on X2;
s2 on A2*.05; s1@0;[s1*.5];
 Bengt O. Muthen posted on Monday, October 02, 2006 - 2:37 pm
The message about a non pos def cov matrix will occur due to the A and C factors being correlated 1, but that is harmless and should not hinder the analysis as long as the cov matrix for the observed variables is pos def as it should be.

If you still have problems, please send input, output, and license number to support@statmodel.com.
 Simona Caravita posted on Thursday, November 16, 2006 - 1:22 am
Dear professor Muthèn,
I'm starting to use Mplus and I ran a model with interactions of latent variables. To interpret the effects of the interactions I watched your handouts about this topic, in "Advanced growth models" explanation, and I found a distinction between unstardardized and standardized solution, presenting very similar (or the same, approximated?) loading coefficients in the example formulas. My question is very basic: for the standardized solution should I standardize the observed indicators of the latent variables? Or should I consider the latent variables as standardized in computing the formula? Thank you very much
 Bengt O. Muthen posted on Thursday, November 16, 2006 - 10:26 pm
I standardized the latent variable (the intercept growth factor) and the covariate (math courses) in order to more easily discuss the results.
 Simona Caravita posted on Friday, November 17, 2006 - 3:48 am
Dear prof. Muthèn,
thank you very much for your answer. Now I have a follow-up basic question: how can I standardize one latent variable? Thank you again
 Bengt O. Muthen posted on Friday, November 17, 2006 - 11:10 am
Say that you have y on f, where f is the latent variable (factor). To standardize the slope with respect to f, you simply multiply the slope by the estimated standard deviation (sqrt of var) for f. Then the new slope says how many units y changes for 1 SD change in f.
 kirby posted on Monday, May 12, 2008 - 11:34 pm
Dear all,
I would like to test an interaction effect

int | F1 xwith F2

where
F1 is a latent variable with continous indicators
and
F2 is a TWO-dimensional latent variable (with formative dimensions, each dimensions with 3 reflective continous indicators).

Does it make sense to test an interaction effect with a two-dimensional latent variable? I read in a German publication that unidimensionality is necessary when estimating an interaction effect with the Latent Moderated Structural Equation method (which as far as I know is default in MPlus).

 Bengt O. Muthen posted on Tuesday, May 13, 2008 - 4:29 pm
I think you are saying that F2 is really 2 factors that share some items in common. If F2 is really 2 factors, each factor should be used to create a separate interaction effect. I can't think of a problem of using 2 factors that share some items.
 kirby posted on Thursday, May 15, 2008 - 8:19 am
Dear Bengt,

what I tried to say was that F2 is a second order construct with two formative dimensions, i.e.

F1 by a1 a2 a3;

dim1 by d1 d2 d3;
dim2 by d4 d5 d6;
F2 by d1@0;
F2 on dim1@1 dim2;
F2@0;

int | F1 xwith F2;

Do you see any problem with such an interaction effect?

 Linda K. Muthen posted on Thursday, May 15, 2008 - 10:15 am
This looks reasonable.
 kirby posted on Friday, May 16, 2008 - 6:30 am
Thanks!
 Laura Francesca Scalas posted on Wednesday, February 04, 2009 - 4:07 am
I am working on a SEM model with latent interaction. I would like to get an effect size for the effect of the interaction term. Can you suggest a formula I can use to compute it?

Another question. I would like to partial out the effect of an exogenous latent variable from the first order (latent) factors before the interaction term is computed. Can I do this with Mplus?
My understanding is that the interaction term is computed as a first step, but I might be wrong...

thanks for your time and help
 Linda K. Muthen posted on Wednesday, February 04, 2009 - 8:08 am
To me an effect size is the difference between two means divided by a standard deviation. I can't see how this applies here. Do you mean a standardized coefficient?

All parameters are estimated simultaneously in Mplus. There is no first step.
 Joyce posted on Thursday, February 19, 2009 - 11:19 pm
Hi, I have latent variables X1-X4 and Y1-Y3 and the following is the Model that I fit,

Y1 ON X1 X2 X3;
Y2 ON X1 X2 X3;
X4Y1| X4 XWITH Y1;
X4Y2| X4 XWITH Y2;
Y3 ON Y1 Y2 X4 X4Y1 X4Y2;
X1 WITH X2 X3;
X2 WITH X3;
X4 WITH X1@0 X2@0 X3@0;
Y1 WITH Y2;

As I know, Mplus doesn't give standardized coefficients for latent interaction model and we need to calculate them by using the SDs of the latent variables.

Therefore, I would like to ask

1. Does Mplus provide the variance of the dependent latent variable in latent interaction model because currently "TYPE = RANDOM" and the TECH4 Output is not available?

2. How to calculate the standardized path coefficients from the interaction term to the outcome variable (e.g. X4Y1 -> Y3)?

Thanks
 Linda K. Muthen posted on Friday, February 20, 2009 - 8:33 am
It is not clear how the interaction would be standardized. I have not seen this presented.
 Timothy posted on Thursday, April 30, 2009 - 10:50 am
Hi, I have a question about interaction. I found a significant interaction. Then, the next step is to understand the nature of the significant interaction term. How can I examine the simple main effects in Mplus?

Thanks!
 Linda K. Muthen posted on Thursday, April 30, 2009 - 1:19 pm
See the Topic 3 course handout starting at slide 161.
 Yu Kyoum Kim posted on Sunday, May 03, 2009 - 12:03 pm
Dear Drs. Muthens,

It is not clear how the interaction would be standardized. I have not seen this presented.

Based on your answer above, I believe that the standardized path coeficient of interaction term cannot be computed yet.

Is that correct?

Thank you so much in advance.
 Linda K. Muthen posted on Monday, May 04, 2009 - 8:54 am
I am not aware how to do this but I don't think it is impossible.

See Appendix B of

Tucker-Drob, E.M. (2009). Differentiation of cognitive abilities across the lifespan. Accepted for publication in Developmental Psychology

which is on our website.
 Christoph Weber posted on Friday, August 14, 2009 - 2:32 am
Dear Drs. Muthén,

I am doing a conditional LGM with multiple indicators. I have three 0/1-coded independet variables. Im interesetd in the three-way-interaction of these dummies. And actually I get a sign. interaction term. But I'm not sure of the robustness of the results, because the "1/1/1-situation" has just a vew cases (n=13). Do you have any suggestions how to deal with this problem? Does it make sense at all to do the analysis with the interaction term?
Furher I would guess, that a subsequent multiple group analysis (boys vs. girls) will be even more problematic.

Thank!
 Linda K. Muthen posted on Friday, August 14, 2009 - 10:30 am
It may be okay given that you are estimating only one parameter. Only a Monte Carlo study could say for sure.
 Christoph Weber posted on Friday, August 14, 2009 - 12:01 pm
Do you have any suggestions or do you know about a paper which deals with the problem of small n in connection with dummy-interactions. Is there a rule of thumb? For example: An interaction of two 0/1-dummies, how many cases should be the 1/1-situation.
 Linda K. Muthen posted on Friday, August 14, 2009 - 12:28 pm
I don't know of any such paper or rule of thumb.
 Magnus Lindwall posted on Wednesday, October 07, 2009 - 2:11 am
Dear Linda and Bengt,

I conducted a latent interaction analysis with continuous factor indicators and compared the -2LL value in the model without the latent interaction term with the -2LL value for the model with the interaction according to recommendations.

Got back the paper with one reviewer claiming one should not compare these two models using log likelihood as they are not nested.

I saw in an earlier response a few years back to a similar question that you Linda answered that you thought that these two models are nested and that you therefore can compare them. Is that still your (or Bengts) opinion?

The reviewer instead suggested comparing the model with the interaction term with a model where one sets the latent interaction term =0. Would this according to you be more correct?

/Magnus
 Linda K. Muthen posted on Wednesday, October 07, 2009 - 9:45 am
I think the two approaches are the same. You might try doing what the reviewer suggests and showing that it is the same.
 Magnus Lindwall posted on Thursday, October 08, 2009 - 1:49 am
Thanks for the reply. I tested what the reviewer suggested and it turns out, as you wrote, that the -2LL value for the baseline model and the model where the latent interaction is=0 is almost identical (differs between .003 and .004). So, seems the two approaches do yield the same result.
 Linda K. Muthen posted on Thursday, October 08, 2009 - 9:34 am
Thanks for letting us know.
 Anonymous posted on Friday, December 11, 2009 - 8:40 am
I am testing continuous latent variable interactions in MPLUS and was looking at this post for looking at why I am not getting fit indices. This clearly explains why. My model converges normally and I get the estimates that look fine. I have a couple of questions:

I am trying to get the likelihood ratio test for the interactions in MPLUS. I have a quick question on how I am operationalizing it. Is it correct that I should use the

Analysis: Type=random;
algorithm = integration;

option even for the linear model with no interaction terms? when I compare likelihoods? I see that using the analysis type = random option, the log likelihood is different than when I do not use it. I was encouraged to see that my results are not very different. Could you tell me why this happens in MPLUS ?

Also, does the type=random option give robust standard error estimates? I found that in each case, the option gave slightly higher standard error than not using the option.

 Linda K. Muthen posted on Friday, December 11, 2009 - 3:56 pm
You should use TYPE=RANDOM for both the model with and without the interaction. You don't need ALGORITHM = INTEGRATION for the model without the interaction.

The difference you see with and without TYPE=RANDOM is due to the fact that for continuous outcomes and TYPE=GENERAL the model is not estimated conditioned on x whereas it is with TYPE=RANDOM. You should do all models using the same analysis TYPE.

MLR is available with TYPE=RANDOM. MLR is robust to non-normality.
 Christoph Weber posted on Thursday, February 25, 2010 - 8:28 am
dear drs. Muthen,

Simulation studies (eg. Coenders et al 2008) show, that with non-normal data LMS overestimates the interaction effects, whereas there are nearly no effects on the significance of the interaction effects. On the other hand the approach suggested by coenders et al underestimates significance, but there is no bias of the interaction effect.

Now I have this problem with my data. LMS leads to a significant interaction (gamma=.311). The coenders et al approach shows an insignificant gamma (=.241).

Would you suggest to report both approaches in a paper?

best wishes

Christoph Weber
 Christoph Weber posted on Thursday, February 25, 2010 - 12:44 pm
One more question: When I'm calculating the confidence bands for the moderation effect, is it possible to use the gammas of the Coenders approach and the co/variances of the coeff. from the LMS approach?
 Linda K. Muthen posted on Friday, February 26, 2010 - 9:44 am
I'm not familiar with the Coenders approach. I would report both.

I would not report estimates from one method and standard errors from another.
 Sarah Gillis posted on Thursday, July 01, 2010 - 11:56 am
From what I read above, if I want to look at 2 models, 1 without a moderator and one adding in the moderator, I need to use the loglikelihood difference chi-square test? If I multiply -2 times the loglikelihood difference for both models, how do I determine if one is better than the other?
Thank you for any help.
 Bengt O. Muthen posted on Friday, July 02, 2010 - 10:05 am
I think you are asking about including an XWITH interaction. If that interaction term influences only one DV, then the test of improvement of the model is the z test for that slope. If the interaction term influences several DVs you could use the 2 times logL diff which is then chi-2 distributed.
 Sarah Gillis posted on Thursday, July 08, 2010 - 1:59 am
Dear Dr. Muthen,
I am in fact including an XWITH interaction into my model and it is only influencing 1 DV. Therefore, it appears the z test is what I want to look at. However, I am unclear how to calculate this from my output and also do I want to find significance or not? Do I calculate the z test from something in my output?
Thank you for any help!
Sarah
 Linda K. Muthen posted on Thursday, July 08, 2010 - 6:10 am
The z test is the ratio of the slope parameter estimate to its standard error which is found in the third column of the results. It is followed by a p-value or you can compare it to a critical value of 1.96 at the 5 percent level.
 Sarah Gillis posted on Thursday, July 08, 2010 - 6:39 am
So it is just the the slope parameter / S. E. for the interaction term then? Basically, it the new term is significant then does that tell me that the my moderator is a good fit for the model? Obviously you have mentioned before that there are not fit indices for moderator models... Thank you so much for your prompt reply!!
 Linda K. Muthen posted on Thursday, July 08, 2010 - 7:37 am
Significance indicates that the parameter is significantly different from zero.
 Peren Ozturan posted on Tuesday, April 19, 2011 - 3:24 pm
Dear professors,
I am trying to run a structural model with interaction terms over five imputed data files. Setting integration to standard(7) and using starting values does not help quicken the process (the estimation screen freezes at some point) probably because I have too many integration points. When I tried Monte Carlo integration, I have some results but feel unsure whether they are of value. So my two questions are:
1. Is there yet another efficient way of specifying such an interaction model?
2. How do I estimate the statistical signifance of MC results?
 Bengt O. Muthen posted on Tuesday, April 19, 2011 - 4:00 pm
How many latent variable interactions does your model have and what is your sample size?
 Peren Ozturan posted on Tuesday, April 19, 2011 - 11:13 pm
I have six latent variables. Due to discriminant validity issues as well as concerns related to integration point complexity I am now using four. My sample size is 412.
 Peren Ozturan posted on Tuesday, April 19, 2011 - 11:17 pm
My model uses four latent variable interactions.
 soyeon ahn posted on Wednesday, April 20, 2011 - 8:42 am
Would it be possible to estimate interaction effect of latent variables from the covariance matrix of indicators?
 Bengt O. Muthen posted on Wednesday, April 20, 2011 - 10:00 am
You could introduce one latent variable interaction at a time to see if it has a significant effect. Or, two at a time. I would think it is unlikely that you need all four.

Non-ML approaches such as using products of indicators are also possible - see e.g. the overview by Marsh et al in Psych Methods a few years ago.
 Peren Ozturan posted on Thursday, April 21, 2011 - 2:15 am
Thanks for the suggestion, Bengt. Only one interaction is significant when I run the model the standard way introducing two interactions at a time. I do not know whether it would be convincing to state that I am not controlling the rest when I get that significance. What do you think?

By the way sorry to iterate but we don't know the significance of MC estimates, is that right?

As a general note: I know about the products of indicators technique and tried using it in Lisrel following (Jaccard and Wan 1995) and one reason I am learning MPlus is to study the latent factor interactions. And I am studying interaction effects between subconstructs of market orientation and environmental factors i.e. turbulence and competitive intensity and my theory suggests to study all moderations.
 Bengt O. Muthen posted on Thursday, April 21, 2011 - 7:58 am
I would be convinced doing it one latent variable interaction at a time, but I don't know about reviewers.

With 4 interactions you could try integ = 7 instead of Monte Carlo integration - this would give less than 2500 integration points which isn't much with your small sample. This should not be slow on at least a 2-processor computer. Be sure to say Processors = 2;

With Monte Carlo integration you can generally trust the SEs - I think that's what you are asking.
 Peren Ozturan posted on Saturday, April 23, 2011 - 8:44 am
Thank you very much, these really helped..
 Elizabeth Sanders posted on Wednesday, July 27, 2011 - 8:29 am
I am running a simple SEM with two latent variables and their interaction, with the three latent variables predicting one observed outcome variable.

I am using analysis type=random since that is what is required for latent interaction estimation, but I cannot get the model indices (e.g., CFI and rmsea) when I use type=random. Is there a way around this?

I know journal reviewers will want to see model indices and I hate to have to drop the latent interaction term just to get model indices.
 Linda K. Muthen posted on Wednesday, July 27, 2011 - 11:07 am
Chi-square and related fit measures are not available when means, variances, and covariances are not sufficient statistics for model estimation as with TYPE=RANDOM.
 Alexander Kapeller posted on Sunday, March 11, 2012 - 10:43 am
Hello

Are you aware of any study that compares power of xwith with product term variables? Thanks
 Linda K. Muthen posted on Sunday, March 11, 2012 - 11:37 am
I think there is a paper that does this by Herb Marsh in Psych Methods. You'll have to search for the reference. I don't have it.
 Jan Zirk posted on Wednesday, May 02, 2012 - 5:12 pm
Dear Linda or Bengt,

I have a model with an interaction term between a binary x and continuous y (entered by DEFINE). Thus the model looks like this (they enter it in broader context of other variables):
x-->z
y-->z
xy --> z

This model generally does not fit the data quite well. Would you enter additional covariance parameters between the regressors and the interaction
(like this: x-->xy y-->xy; or x<-->xy, y<-->xy)? When I enter them the goodness-of-fit gets better, though I am not sure if just the command DEFINE, without these additonal links, is not enough?
 Linda K. Muthen posted on Thursday, May 03, 2012 - 11:35 am
Are x and y exogenous or endogenous variables.
 Jan Zirk posted on Thursday, May 03, 2012 - 11:56 am
They are exogenous in sense that they are predictors of z but at the same time they are mediators (both depend on different variables)
 Bengt O. Muthen posted on Saturday, May 05, 2012 - 8:22 am
Let me try to intepret what you are modeling. It sounds like your model is of the following type (although more complex):

Usev = x m y;

Define: xm = x*m;

Model:
m on x;
y on m x xm;

The issue is the interaction xm which is an interaction between an exogenous variable x and an endogenous variable m (you should not call m an exogenous variable even if it is a predictor of y: When it is influenced by another variable, that is x, then it is endogenous).

If this is what you are asking, then the answer is that the inclusion of the interaction term does hurt chi-square but you cannot and should not rely on the chi-square test of model fit for such models and you should not try to add parameters to make it fit. The reason you cannot rely on chi-square here is that with an x*m interaction the variance for y conditional on x is no longer constant as is assumed in the chi-square testing, but varies with the x values.
 Jan Zirk posted on Saturday, May 05, 2012 - 9:14 am
Dear Bengt,
Thank you so much for this exhaustive reply. It fully answers my question. Sorry fo lack of precision in my description of the model; next time I will just paste part of the code.

Best wishes,

Jan
 Jason Major posted on Thursday, August 02, 2012 - 11:16 am
Hello, I am running an LMS model with one linear and one quadratic effect, and I'm having a problem in calculating the R-squared of the effects compared to the Mplus output.

I've read several papers that state that R-squared of the quadratic effect is equal to the coefficient of the quadratic effect squared multiplied by 2 times the variance of the IV, all divided by the variance of the DV. (Marsh, Wen and Hau, 2004 gave an expanded form of this formula; Harring, Weiss & Hsu, 2012 recently gave this form).

However, when I compare the R-squared from this formula to the residual variance in Mplus (which I assume can be used to check the explained variance), the two don't match up. The formula overestimates the size of the quadratic effect compared to the explained variance based on the residual variance.

This seems to be the case whether I estimate the quadratic effect alone, or both the linear and quadratic effects in the same model.

One issue that I thought might be causing this mismatch is that my DV is not latent but manifest. But I'm not sure whether this would effect the formula for the R-squared of the quadratic effect.

I would appreciate any help/advice you can give me.
 Linda K. Muthen posted on Friday, August 03, 2012 - 12:08 pm
See the FAQ on the website called Latent Variable Interactions to see how to compute R-square for a regression with an interaction.
 Jason Major posted on Friday, August 03, 2012 - 3:41 pm
Hi Linda,

I have taken a look at the FAQ and Mooijaart & Satorra (2009), which it references.

The problem is that the formulas provided there are for calculating R-square for the interaction effect in a model with two linear effects and one interaction, whereas my model only has one linear effect and one quadratic effect.

The formulas also reference a disturbance term for the dependent variable, whereas my DV is a single manifest variable.

I thought that I may be able to infer the R-square of the quadratic effect by subtracting the variance due to the linear effect from the explained variance.

If the DV is standardized by setting its variance to 1, then I think the R-square of the linear effect is simply the square of the standardized regression coefficient? The problem with this though is that the intercept isn't zero in the model, so I'm not sure if this simple forumla applies.

I've also have tried comparing the R-square of the full model to one with the linear effect only, but the size of the linear effect increases slightly with the inclusion of the quadratic effect, so its size isn't consistent, which may indicate something wrong with the model assumptions?
 Bengt O. Muthen posted on Saturday, August 04, 2012 - 9:34 am
I think the general formulas in the FAQ can also be used for your case since they pertain to products of variables. And it would seem that your model also would include a residual for the DV - the fact that your DV is observed doesn't matter.
 Andrea Norcini Pala posted on Wednesday, September 05, 2012 - 11:15 am
Dear Professors,

I have a question about interaction,let's say that I have defined a new variable that is the "interaction" where INT=RR*EZ.
On my regression, should I include each element? Namely, should the syntax look like this:

Y on INT RR EZ;

Again, using the same elements but changing the operation INT=RR/EZ, should the syntax look like that above?

Thank you?
 Linda K. Muthen posted on Wednesday, September 05, 2012 - 11:32 am
I think you should include the main effects and the interaction as you show above.
 Andrea Norcini Pala posted on Wednesday, September 05, 2012 - 2:47 pm
Just to be sure, you mean I should include them also when INT is RR/EZ. is it correct?

Thank you again
 Linda K. Muthen posted on Wednesday, September 05, 2012 - 6:19 pm
Yes.
 Naomi Friedman posted on Wednesday, September 12, 2012 - 5:45 pm
Hello. I would like to present the standardized estimates for an SEM with latent variable interactions. I have looked at this thread and the FAQ on latent variable interactions which includes a description of standardization, but I'm confused about whether it is possible to calculate a standardized interaction beta given some of your answers earlier in the thread. It would seem that once the variance V(n1 ×n2) for the interaction was computed according to the formula in the FAQ, that could be used to compute the standardized interaction beta as b3*SD(n1 ×n2)/SD(n3). Would this be appropriate?

If so, then it would seem slightly different than the standardization described in the FAQ, which computes a standardized b3 in the moderator function (b1 + b3*n2) n1 by multiplying b3 by SD(n1) * SD(n2) and dividing by SD(n3); this form of standardization does not include the covariance term for the IVs, which is included in the estimate of V(n1 ×n2).
 Naomi Friedman posted on Wednesday, September 12, 2012 - 5:46 pm
One more thing: I think I may be misunderstanding the FAQ, but I also am very confused about the computations in the standardization section of the FAQ: it computes standardized betas for the b1 and b3 coefficients in the term (b1 + b3*n2), which it describes as being obtained by dividing both by SD(n3) = sqrt(3.17), multiplying b1 by SD(n1) = sqrt(2), and multiplying b3 by SD(n1)* SD(n2) = sqrt(2). However, with the given values of b1=.5 and b3=.4, I don't see how the standardized estimates of .199 and .159 for b1 and b3 come out; shouldn't they be .5*sqrt(2)/sqrt(3.17)= .40 and .4*sqrt(2)/sqrt(3.17)=.32?
 Bengt O. Muthen posted on Thursday, September 13, 2012 - 10:59 am
Good questions - let me get back to you about them tomorrow.
 Naomi Friedman posted on Tuesday, September 18, 2012 - 1:51 pm
Great, any thoughts you have would be appreciated!
 Bengt O. Muthen posted on Thursday, September 20, 2012 - 3:10 pm
First, a new version of the FAQ posting will be up (probably tomorrow) and corrects the standardized numbers which were from an earlier version that had different population values.

Second, the Wen, Marsh, Hau (2010) SEM article gives an explanation for why the square root of the variance of the product of eta1 and eta2 should not be used in the standardization of beta3 and why instead the product of the square root of each variance for eta1 and eta2 should be used as in my note.
 Bengt O. Muthen posted on Thursday, September 20, 2012 - 3:20 pm
The new version of my FAQ note will have the date 9/20/2012 in the heading.
 Bengt O. Muthen posted on Friday, September 21, 2012 - 2:10 pm
The revised version of the FAQ Latent Variable Interactions has now been posted.
 Christoph Weber posted on Friday, October 26, 2012 - 3:58 pm
Hello!
Has something changed from Version 6 to 7 in connection to the xwith command?
I am using syntax and data (nonlinear effect) which run without problems in V6, but now I get the following error messages

THE LOGLIKELIHOOD DECREASED IN THE LAST EM ITERATION. CHANGE YOUR MODEL,
STARTING VALUES AND/OR THE NUMBER OF INTEGRATION POINTS.

THE MODEL ESTIMATION DID NOT TERMINATE NORMALLY DUE TO AN ERROR IN THE
COMPUTATION. CHANGE YOUR MODEL AND/OR STARTING VALUES.

Thanks
Christoph Weber
 Christoph Weber posted on Friday, October 26, 2012 - 4:17 pm
It seems that one problem is connected with the centering option. I use the following input:

USEVARIABLES ARE
b2044_3 b2044_4 b2044_5
b1003_02 b1003_05 b1052_5;

define:
center b2044_3 b2044_4 b2044_5 (grandmean);

ANALYSIS: TYPE = random;
ALGORITHM=INTEGRATION;
ESTIMATOR = MLR;

MODEL:
exb2 by b1052_5
b1003_02
b1003_05 ;

mstk2 BY b2044_3
b2044_4
b2044_5;

sk2 | mstk2 xwith mstk2;

exb2 ON mstk2 sk2 ;

Actually the intercepts of b2044_3-b2044_5 are not equal 0. When I fix these parameters to 0, I get very similar parameter estimates to that of Version 6, but the error messages remain.

Christoph
 Linda K. Muthen posted on Saturday, October 27, 2012 - 6:54 am
Please send the input, data, and output to support@statmodel.com.
 Christoph Weber posted on Monday, October 29, 2012 - 1:19 pm
Hello,
one more question regarding the curvilinear effect: the latent var mstk2 is nonnormal distributed, thus I use in addition to the LMS approach Marsh's unconstrained and partial constrained approach (GAPI).

Now I am somewhat confused about the messurement error constraints.

According to Marsh et al (2006, in the Hancock/Mueller book, see also Kelava et al (2011) Advanced Nonlinear Latent Variable Modeling.... Struct. Equ. Mod. 18, p.465):

given:

x1 = 1*F1 + e1
x2 = lambda2*F1 + e2
x3 = lambda3*F1 + e3

then...

x1² = 1*F1² + e4
x2² = lambda5*F1² + e5
...

where...

Var(e5) = 4*lambda2²*Var(F1)*Var(e2) + 2*(Var(e2))²

But why is it 4*lambda2²... and 2*(Var...).

Shouldn't it be ...
Var(e5) = 2*lambda2²*Var(F1)*Var(e2) + (Var(e2))²

Thanks
Christoph
 emmanuel bofah posted on Tuesday, October 30, 2012 - 6:39 am
hi,

With the following paper supplementary material they created Marsh, H. W., Nagengast, B. & Morin, A. J. S. (2012). Measurement invariance of big-five factors over the life span: ESEM tests of gender, age, plasticity, maturity, and La Dolce Vita effects. Developmental Psychology.
They created the syntax for the GROUPING a3s2 (11=A1S1, 12=A1S2,21=A2S1,22=A2S2,31=A3S1,32=A3S2); which was defines as 6 groups (3 age x 2 gender).

Can you advise me on how the groupings were created. Either with Mplus or Spss and any syntax for it.
it maybe a wrong platform for this question.
 Linda K. Muthen posted on Tuesday, October 30, 2012 - 1:23 pm
I would ask Herb Marsh that question.
 Christoph Weber posted on Tuesday, October 30, 2012 - 2:23 pm
Does this refer to Marsh et al 2012 (ESEM) or Marsh et al 2006 (Interactions)?
 emmanuel bofah posted on Tuesday, October 30, 2012 - 4:06 pm
IS Marsh et al 2012 (ESEM)

Can u give me the title of the Marsh et al 2006 interactions paper
 Christoph Weber posted on Tuesday, October 30, 2012 - 4:17 pm

 Bengt O. Muthen posted on Tuesday, October 30, 2012 - 5:33 pm
Christof - please direct your interaction question on 4*lambda2... to Kelava himself. We don't use this method.
 emmanuel bofah posted on Thursday, November 08, 2012 - 12:56 pm
Will like to know if you have had any information concerning my question from Herb Marsh. you promise to ask him.
 Linda K. Muthen posted on Thursday, November 08, 2012 - 2:08 pm
I'm sorry. I meant that you should contact Herb Marsh not that we would contact Herb Marsh.
 lamjas posted on Saturday, March 09, 2013 - 2:13 am
It seems that when XWITH is used for latent variable interactions, multiple group analysis can't be used. So, the only thing I can do is MIMIC approach. Is it correct? Thanks for your advice.
 Linda K. Muthen posted on Saturday, March 09, 2013 - 6:17 am
You can do this using RANDOM MIXTURE with KNOWNCLASS.
 lamjas posted on Saturday, March 09, 2013 - 4:29 pm
Hi Linda,

When I use RANDOM MIXTURE, I need to identify a latent class, which is not my intention. I use XWITH to obtain an interaction of two continuous latent variables. It turns out the only way to do is MIMIC model. Is it correct?

I have another question about plotting of interaction. I have read the FAQ paper "LV interaction". What is the syntax to obtain the graph shown in the figure?
 Bengt O. Muthen posted on Sunday, March 10, 2013 - 1:05 pm
This graph was done outside Mplus. But it can be done using the new LOOP plot facility in Version 7, letting eta_1 vary. You just use the formulas (23)-(25) in the FAQ.
 Johan Korhonen posted on Tuesday, October 08, 2013 - 12:20 pm
Dear Professors I have a question concerning a latent interaction model I have been running (N=600):

SEM without latent interaction fits the data well:
estimator = MLR;

MA by m1-m6
WM by w1-w5
TA by t1-t3

MA on WM TA

CFI=.98; TLI=.979 RMSEA=.03

When I add the interaction WMxTA I get the warning message: latent variable covariance matrix is not positive definite. I see that the residual variance of MA is negative (but non-significant). But even after I constrain the residual variance to zero I still get the warning. The interaction is significant so I would really want to include it in my model. But I´m a little cautious about interpreting the results when I get this message. Should I try to standardize the regression paths (as in the FAQ) to see if there is a correlation greater than one (because tech4 is not available)? Or do you have other suggestions?

PS. I also did a multiple imputation (20 datasets) and re-run the model and did not get any Warning-messages even though the residual variance of MA was still negative (p=.79).

Johan Korhonen
 Linda K. Muthen posted on Wednesday, October 09, 2013 - 10:09 am
You need to ask for TECH9 with multiple imputation. This is where the warning messages will be found.

It is likely that your model is misspecified. See the R-square without the interaction. It may already be high and adding the interaction may explain too much variance. You may need residual covariances among some of your factor indicators. The only way they can relate in your model is through the factors. See modification indices.
 Johan Korhonen posted on Thursday, October 10, 2013 - 8:39 am
Thank you Linda for your answer. The R-square is .39 without the interaction. I will check the modindices.

Johan
 una posted on Monday, October 28, 2013 - 10:27 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,
 Akihito Kamata posted on Tuesday, June 30, 2015 - 12:14 pm
Hello,

I am trying to run a simulation by using MONTECARLO procedure with a random intercept 2-level regression model with an interaction term between two between-level observed variables.My analysis model is very simple like:

MODEL: %within%
y ON x;
%between%
y ON w2 mod w2mod;

where w2mod is an interaction effect. It does not seem like the DEFINE command does not work with MONTECARLO procedure. How can I handle it? Thank you in advance.

Aki
 Bengt O. Muthen posted on Wednesday, July 01, 2015 - 5:06 pm
Do 2 runs:

1. Internal MC using w2 and mod.

2. External MC using Define to create interaction.
 Tamara Fitz posted on Saturday, February 13, 2016 - 8:14 am
Dear Prof. Muthen,

I have a question regarding a latent moderated regression model. All variables are continuous. The variable TI01_01 is observed while the others are latent that have observed factor indicators. I tried different things and read in the forum and users guide but I can not figure out why Mplus keeps telling me that there is an “Unknown variable(s) in an ON statement: ON”. I can imagine that it is related to the manifest variable TI01_01 but I don’t know how to solve the problem. I did not forget to list it in the USEVAR-Part.

DATA: file is sun.dat;
VARIABLE: NAMES ARE …
USEVAR=...
MISSING = all (-99);
ANALYSIS: TYPE = RANDOM;
ALGORITH = INTEGRATION;

MODEL:Ident BY EF01_01 EF01_02 (…);

Polit BY EF01_05 EF01_06 EF01_07 (…)

Partic BY PA01_01 PA01_02;

Ident with Polit;
Polit with Partic;
Ident with Partic;

TI01_01 ON Ident
TI01_01 ON Polit
TI01_01 ON Partic;

ParId | Partic XWITH Ident;
ParPo | Partic XWITH Polit;

TI01_01 ON ParId
TI01_01 ON ParPo

OUTPUT: TECH8;

*** ERROR in MODEL command
Unknown variable(s) in an ON statement: ON
 Linda K. Muthen posted on Saturday, February 13, 2016 - 9:44 am
You need to put semicolons after each of the ON statements.
 Tamara Fitz posted on Sunday, February 14, 2016 - 4:16 am
Dear Prof. Muthen,
thanks a lot for your quick answer even at a weekend. It worked out now.
Kind regards
tamara
 Pia H. posted on Tuesday, April 19, 2016 - 3:57 am
Hello,

I have an interaction term with a continuous latent variable (g_trauma) and a categorical observed variable (maoa_zyg) and I am using the XWITH command:

agextrauma| age XWITH g_TRAUMA;
g_PSYCHO ON agextrauma;

maoaxtrauma | MAOA_zyg XWITH g_TRAUMA;
g_PSYCHO ON maoaxtrauma;

My problem is that I have a cluster variable, which means I need to use the type=complex or twolvel command, but this does not work with the interaction because this needs type=random (if I understood that correctly).

Could you tell me if there is a way to have both the cluster and the interaction command in my script?

Thank you very much,
Pia
 Linda K. Muthen posted on Tuesday, April 19, 2016 - 10:25 am
You can use TYPE=COMPLEX RANDOM or TWOLEVEL RANDOM.
 Pia H. posted on Wednesday, April 20, 2016 - 3:06 am
Dear Prof. Muthen,

thank you for the prompt reply. When using TYPE=COMPLEX RANDOM I get the following error warning:

*** FATAL ERROR
THERE IS NOT ENOUGH MEMORY SPACE TO RUN Mplus ON THE CURRENT INPUT FILE. THE ANALYSIS REQUIRES 10 DIMENSIONS OF INTEGRATION RESULTING IN A TOTAL OF 0.57665E+12 INTEGRATION POINTS. THIS MAY BE THE CAUSE OF THE MEMORY SHORTAGE. YOU CAN TRY TO REDUCE THE NUMBER OF DIMENSIONS OF INTEGRATION OR THE NUMBER OF INTEGRATION POINTS OR USE INTEGRATION=MONTECARLO WITH FEWER NUMBER OF INTEGRATION POINTS SUCH AS 500 OR 5000.

Using the MONTECARLO command does not solve the problem, unfortunately.

On a related note, I am considering estimating interaction effects in a multigroup model to simplify the interaction terms. Since my grouping variable is a categorical observed variable I was wondering if the KNOWNCLASS command can be used with observed variables (by now, I only found information on latent classes related to KNOWNCLASS).

Thank you very much,
Pia
 Linda K. Muthen posted on Wednesday, April 20, 2016 - 6:54 am
 Patty Fitz posted on Wednesday, July 06, 2016 - 7:39 am
Dear M-Plus team,
I am doing an SEM with an interaction. As there are no modelfit indices given in Mplus, I am looking at the indices (CFI, RMSEA etc.) of the model without interaction, as you recommended in a previous post.
You advised also to look at the logL difference between the model with and without interaction. So I looked up their log likelihood difference in chi-square distribution and I found it is not significant (the number is smaller than the critical number in the table, 2df, 0.05).
That would mean I cannot reject the null hypothesis of equal fit for both models? Is that correct? What does it mean exactly for an interpretation regarding model fit? The model with or without interaction fits better to data? Or does it mean the modelfits indices of the model without interaction works also for the model with the interaction? Thanks for your help
 Bengt O. Muthen posted on Wednesday, July 06, 2016 - 5:41 pm
Fit is discussed in Section 1.2 of our FAQ on our website:

Latent variable interactions

If chi-square is not significant, there is no need for an interaction.
 Rianne van Dijk posted on Thursday, September 08, 2016 - 7:42 am
Dear Bengt and Linda,

In our longitudinal model, we also look at an interaction term (continuous*continuous) as a predictor. We plotted the interaction in Mplus by using -2 SD, the mean, and +2 SD of one of the predictors in the interaction term, which obviously produces a plot with 3 lines. Is it possible to test whether the slope of each of those 3 lines is significantly different from zero? And yes, how could we do this?

Thank you very much for your response
 Bengt O. Muthen posted on Thursday, September 08, 2016 - 1:30 pm
You can express these lines in Model Constraint in order to test their slopes.
 Rianne van Dijk posted on Friday, September 09, 2016 - 7:10 am
Dear Bengt,

Thank you for your quick response. We used:

Model constraint:
plot (lowmn medmn highmn);
loop(motneg,0,30,0.1);
lowmn = (b1+b3 *(-2))* motneg + b2 *(-2);
medmn = (b1+b3 *(0))* motneg + b2 *(0);
highmn = (b1+b3 *(2))* motneg + b2 *(2);

!simple slopes
NEW(ss1-ss3);
ss1=b1+b3*(-2.07); !2.07 = 1SD of f2
ss2=b1;
ss3=b1+b3*(2.07);

The simple slopes resulting from this code match with the plot data. However, since we requested the plot for -2 and +2sd, we would expect that we need to multiply the SD for the simple slope with -2 and +2 as well. When we do this, the simple slopes estimates do not match with the plot data. Are we missing something?
 Bengt O. Muthen posted on Friday, September 09, 2016 - 1:50 pm
I am confused. you have -2 and 2 in for loop but -2.07 and 2.07 for the simple slopes - are they for the same variable? Or is the 2.07 meant to reflect a motneg value?
 Rianne van Dijk posted on Monday, September 12, 2016 - 1:11 am
In the loop we used -2 and 2 for specifying 2 SD above and below the mean. -2.07 is actually the value of 1 SD of that similar variable. But considering your confusion, I assume they should be the same for both the plot as for specifying the simple slopes? So, should we use -2 and +2 (as in 2 SD below and above the mean) or -4.14 and +4.14 (in our case the value of 2 SD for that variable)?
 Bengt O. Muthen posted on Monday, September 12, 2016 - 9:15 am
That sounds right. The value you choose influences the simple slope.
 Anne Black posted on Friday, June 09, 2017 - 12:09 pm
Dear Drs. Muthen and Muthen,
I need to create an interaction between an observed and latent variable for a SEM. I am using Type=Complex and multiple group analysis, and am modeling a count outcome using WLSMV estimation. I believe XWITH is only available for KNOWNCLASS, and perhaps not with Type=Complex? Is there a way to create the product term using the model specifications I have?

 Bengt O. Muthen posted on Friday, June 09, 2017 - 4:32 pm
Use Type = Complex, XWITH, Knownclass, MLR
 Jan posted on Sunday, December 03, 2017 - 12:51 am
I tried to plot a modified effect on the within level. In the example below both x and z are binary. I wondered what is the appropriate specification of the LOOP XAXIS when x is binary. I doubt that the current code for the plot is correct, as all the variables in the model take only positive values, but the resulting plot shows negative values for both the y scale and the x axis. Is there any necessary option that my loop plot is lacking? Thank you for any help.

USEVARIABLES = y x z u
xu zu ;

WITHIN = x z u xu zu ;

ANALYSIS:
TYPE = TWOLEVEL RANDOM;
ESTIMATOR = Bayes;
PROCESSORS = 4;

Fbiterations = 10000;
MODEL:
%WITHIN%

y ON x (bs1) ;
y ON IT1_Pic_ty_posit;
y ON u;
y ON xu (bs4);
y ON zu;

MODEL CONSTRAINT:

New ( s1_ s1s4 );

s1_ = bs1 + (bs4*(0));
s1s4 = bs1 + (bs4*(1));

PLOT(pls1_ pls1s4 );

LOOP(XAXIS, -2, 2, 0.1);

pls1_ = s1_ * XAXIS;
pls1s4 = s1s4 * XAXIS;

PLOT:
TYPE = plot2;

OUTPUT: TECH1 TECH8 sampstat patterns cinterval;

PLOT:
TYPE = plot1 plot2 plot3;
 Jan posted on Sunday, December 03, 2017 - 12:54 am
In the code above the "y ON IT1_Pic_ty_posit;" should be "y ON z; "
 Bengt O. Muthen posted on Monday, December 04, 2017 - 2:59 pm
The x-axis refers to your u variable which I assume has mean and variance 0,1 - so it can be negative. To get the y-axis right you need to add in the other effects (of u, z, and zu) and the y intercept.
 Jan posted on Wednesday, December 13, 2017 - 4:32 am
Thank you very much for your time;
My x is binary with mean=.4 sd=.4906095, while u is binary with mean=.2 and sd=.400581. Also z is binary with mean .2 .400581. I have adjusted the code to include all the effects, and hope that the y axis is correct now. I wonder how should I specify now the X axis?

USEVARIABLES = y x z u
xu zu ;

WITHIN = x z u xu zu ;

ANALYSIS:
TYPE = TWOLEVEL RANDOM;
ESTIMATOR = Bayes;
PROCESSORS = 4;

Fbiterations = 10000;
MODEL:
%WITHIN%

y ON x (bs1) ;
y ON z (bs2);
y ON u (bs3);
y ON xu (bs4);
y ON zu (bs5);

MODEL CONSTRAINT:

New ( s1_ s2 s3 s1s4 s3s5);

s1_ = bs1 ;
s2 = bs2 ;
s3 = bs3 ;
s1s4 = bs1 + (bs4*(1));
s3s5 = bs3 + (bs5*(1));

PLOT(pls1_ pls1s4 pls2 pls3 pls3s5);

LOOP(XAXIS, -2, 2, 0.1);

pls1_ = s1_ * XAXIS;
pls1s4 = s1s4 * XAXIS;
pls2 = s2 * XAXIS;
pls3 = s3 * XAXIS;
pls3s5 = s3s5 * XAXIS;

PLOT:
TYPE = plot2;

OUTPUT: TECH1 TECH8 sampstat patterns

cinterval;

PLOT:
TYPE = plot1 plot2 plot3;
 Bengt O. Muthen posted on Wednesday, December 13, 2017 - 2:10 pm
Your variables are binary so there is no continuous variable available for the x-axis. Instead, you have different values for the slopes depending on which category of x,z, u that you are considering.
 Jan posted on Thursday, December 14, 2017 - 2:34 am
That's right, they are all 0 1 coded. So the the correct LOOP option is:

LOOP(XAXIS, 0, 1, 0.1)

Is this correct?
 Bengt O. Muthen posted on Thursday, December 14, 2017 - 12:19 pm
use this to get the 2 values:

loop(xaxis,0,1,1).
 Jan posted on Friday, December 15, 2017 - 7:25 am
That's perfect, thank you very much. Of course.
 Kathleen Kenny posted on Friday, December 22, 2017 - 1:30 pm
Hello!
I am running a model with an interaction term (X1*X3) and a binary outcome.

In the model the estimate for main exposure X1 (coded 0/1) is positive and moderator X3 (coded 0/1) is positive, yet the estimate for interaction term X1*X3 is negative. Any thoughts on how this could be?

Thank you
 Jan posted on Friday, December 22, 2017 - 2:03 pm
Kathleen: not sure this is for the MPlus forum, but basically this means that the association of x1 at upper level of x3 is weaker than the x1 at lower level of x3. See e.g. http://www.theanalysisfactor.com/interpreting-interactions-in-regression/
 Kathleen Kenny posted on Friday, December 22, 2017 - 8:38 pm
Thanks Jan. I am doing a moderated mediation path analysis in SEM. My moderator would be expected to have synergistic interaction with main exposure but am not seeing this.