Message/Author 

yao lu posted on Monday, March 05, 2012  2:24 pm



Hello. I have three variables: x1 and y1: latent variable x2: observed continuous variable I aim to test: how x2 moderates the relation between y1 on x1. I plan to test the above interaction effect as below: 1. divide x2 to two groups based on media score. The score in each group stays continuous (instead of categorical). 2. create an interaction term (e.g.,Int) between x2 and x1. The interaction effect thus as: Y1 on Int. 3. using multiple group SEM, comparing model fit with the parameter of "Y1 on Int" constrained and freely estimated. My questions are: 1. Is this method superior than simply dividing X1 a categorical variable? 2. for the interaction term, should I use: Define or XWITH command? Thank you very much. 

yao lu posted on Monday, March 05, 2012  9:23 pm



Hello Drs. Muthen, I revisited my question above and thought it might be clearer if I write out my syntax: grouping=group (1=high, 2=low); Model: y1 on x1; int  x1 XWITH x2; y1 on int (1); model low: y1 on x1; int  x1 XWITH x2; ! the above is for the constrained model, below is for the unconstrained model;and by comparing the two model fit, I can conclude whether there is significant moderating effect? grouping=group (1=high, 2=low); Model: y1 on x1; int  x1 XWITH x2; y1 on int; model low: y1 on x1; int  x1 XWITH x2; y1 on int; Thank you very much for your help. 


You should not use a variable as both a grouping variable and an analysis variable. You should do this as a singlegroup analysis leaving the variable as continuous and using XWITH. You can use DEFINE to create an interaction only if both variables are observed. 

yao lu posted on Tuesday, March 06, 2012  2:58 pm



Dr. Muthen, thank you for your earlier reply. I ran the model according to your suggestion. I encountered two problems. 1. I have two moderators (e.g., sim and fam below), each influencing three direct effects. Syntax as such (all variables are latent): Int1  ccom XWITH sim; Int2  ctrust XWITH sim; Int3  catt XWITH sim; Int4  ccom XWITH fam; Int5  ctrust XWITH fam; Int6  catt XWITH fam; fcom on ccom; fcom on Int1 Int4; ftrust on ctrust; ftrust on Int2 Int5; fatt on catt; fatt on Int3 Int6; The program indicated that the model is too large and the memory is not enough (after release all the possible memory). I tried to run just one moderator with three interaction effects, the program indicates that there are 50625 integration points. What would be the best alternative given this circumstance? 2. I have tested the model fit before incorporating interaction terms. How I can evaluate the model fit for the model with interaction terms? I did not see any fit indices in the output? Thank you very much in advance. 


You should run the model with one interaction at a time. It is unlikely they are all significant and each one requires one dimension of integration. Chisquare and related fit statistics are not available with TYPE=RANDOM. See the following FAQ on the website: The variance of a dependent variable as a function of latent variables that have an interaction is discussed in Mooijaart and Satorra 

yao lu posted on Tuesday, March 06, 2012  6:52 pm



I got it. Thank you very much! I am sorry to trouble you again, but I have a follow up question. For Type = Random, the model results are unstandardized. In order to report the corresponding standardized statistics, I need to manually calculate? For my study, I have a hypothesis of relationships of Y on X, and another hypothesis of the interaction effect of X and Z influencing Y. For testing the first hypothesis, should its coefficient be based on the model without or with interaction? I am asking this is because I found out that coefficient are very different between the model with and without interactions. Thank you very much for your time. 

Anke Schmitz posted on Thursday, February 13, 2014  8:12 am



Hello Drs. Muthen, I have a question: Is it possible to create an interaction term between the following independent variables? latent categorical variable manifest categorical variable manifest continuous variable In know how to define interactions terms with the asterix and with the xwith command, but I ask myself how to combine those commands to analyze a threewayinteraction. Regards Anke 


Create an interaction product between two manifest variables and use it in XWITH with a latent variable. 

Back to top 