As a part of my SEM, I want to create an interaction term between my IV (observed dichotomous variable that I contrast-coded (-0,5 or 0,5) according to its two experimental conditions) and my moderator MOD (latent variable with 5 indicators MOD1-5).
In Mplus, I am using the xwith-command to create the interaction term.
R does not provide such a command. During my research, I read about the indProd function and the benefits of double mean centering. However, the following does not provide me with a solution that corresponds with the output of Mplus.
“
...
dataset_dmc <- indProd(mydataset, var1 = c("IV"),
var2 = c("MOD1", "MOD2", "MOD3", "MOD4", "MOD5"),
match = FALSE, meanC = TRUE,
residualC = FALSE, doubleMC = TRUE)
…
IVxMOD =~ IV.MOD1+ IV.MOD2 + IV.MOD3 + IV.MOD4 + IV.MOD5
...
"
Adding this interaction term into my path analysis provides me with strange results that have nothing in common with the output from Mplus.
Put simply: How can I build the correct interaction term for my variable specification? What is Mplus
actually doing when applying the xwith command - is it even possible to exactly reproduce the Mplus output in R for this type of interaction?
Thank you very much for your help!
Best,
Philipp