Sarah Victor posted on Wednesday, October 24, 2018 - 12:47 pm
Hello! I think what I would like to do is impossible, but I want to check to be sure.
I am modeling within-person affective dynamics (using EMA data, at level 1) and I want to know whether these differ on the basis of a between person (level 2) variable. I have been able to do this with a binary level 2 variable by regressing the random AR, intercept, and variance parameters on the binary variable at level 2 and then using MODEL CONSTRAINT.
However, I am now interested in looking at a between person variable that is categorical with three possible values. I looked into using the KNOWNCLASS option with TYPE = MIXTURE, but I received an error that I cannot use the CLUSTER option with TYPE = MIXTURE (I am using CLUSTER to specify the variable that demarcates each individual in the sample in which their level 1 data are nested), and the only types of analyses that allow the CLUSTER command along with MIXTURE do not work with Bayes.
Am I understanding this correctly? If so, is there another way to compare > 2 groups in the DSEM framework?
Many thanks for your suggestions on DSEM for our intensive longitudinal study design!
May I ask if there is an option (maybe in the context of DSEM) for the clustering of time series? (e.g. similar to GMM, for the identification of latent sub-groups in growth trajectries) OR - if we stay with GMM, how many timepoints can possibly/sensibly be included?
Yue Yin posted on Wednesday, May 29, 2019 - 11:48 am
Dear Dr. Muthén
I want to generate data for a DSEM model with a binary covariate ("group": 0 or 1) at the between level. I want to generate same number of 0 and 1 (50/50 split) for the “group" variable. I used the cutpoints = group(0) and specified group*1 and [group*0]. However, the data I generated do not have equal number of 0 and 1 in the "group" variable. In the data, the "group" variable will have impact on mean, auto-regressive and residual, so I did not choose multiple group command. I am wondering what part should I fix ? Thank you in advance.
We don't really have multiple group DSEM yet the way we have it for standard SEM. You can generate each group separately and then join the files but you will have to change the cluster variable for the second group. Alternatively, you can use the approach you are using but you would add regression on group on the between level for the dependent variable (this will give you the change in means), as well as regression of random autoregressive parameters as well as regression on the random residuals. The split will be random 50/50 meaning that on average the split is 50/50 but due to random draws will actually vary over samples. If you need exactly 50/50 you would have to generate slightly bigger sample and trim the excess after the generation.
Yue Yin posted on Thursday, May 30, 2019 - 11:10 am
Thank you so much, Dr. Asparouhov. Could you introduce me the Mplus command or an easy way to trim the data since I want to do 500 replications?
I don't really have an easy way to trim the data for 500 replications. I wouldn't worry too much about the split not being exactly 50/50, particularly if the sample size if 100 or more.
You can also consider external montecarlo where the data is generated elsewhere and is analyzed in Mplus, you can see how that works in User's guide example 12.6 step 2. You could even generate the two groups separately, get an automatic way to merge 500 pairs of files and then use the external montecarlo, but again I think you are overestimating the importance of the split being exactly 50/50.