First of all, thank you both for the amazing work you do, both in the design/implementation of MPlus, and in providing support to users here.
I am running a two-level, random effects model in the DSEM (Bayesian) framework. My within-person (level 1) variables are observed and dimensional. At the between-person level (level 2), I am regressing two latent factors on the slope of my within-person effect. The syntax is roughly:
%WITHIN% slope | yvar ON time;
%BETWEEN% factor1 BY f1* f2 f3 f4 f5; factor1@1; factor2 BY f6* f7 f8 f9 f10; factor2@1; slope ON factor1 factor2; factor1 WITH factor2;
This runs just fine! However, I would like to test whether a binary level 2 variable moderates the effects of factor1 and factor2 on slope. I tried using the GROUPING command and the XWITH command, but neither seem to work with Bayes.
Is it possible to test an interaction of a latent variable and a binary observed variable using Bayesian estimation? If not, what do you recommend?
Thank you for your reply! I can run the analysis using ML methods to get the XWITH and GROUPING variables to work, but because of the type of data I'm working with (naturalistically collected, variable intervals between assessments, variable number of assessments) the Bayesian DSEM model works much better. Is it possible to do multi-group with Bayes as the estimator?
For the second point, do you mean create the second set of variables, delete values (set as missing) for the original variables for all members of one group, and then do the opposite for the other set of variables, such that each participant has data for only one set of variables on the basis of the binary observed variable?
I am not quite sure what you mean by the plausible values. I could sum the items from the latent factors (questionnaire items) so "factor1" and "factor2" are observed instead of latent, but that seems suboptimal.
Multilevel multi-group with Bayes is not possible at this time - you have to use the trick of doubling the variables to get it. The data arrangement that you describe will work but it is not the most efficient - you can arrange the data in parallel so N=max(Ng) not sum(Ng).