michaelhallquist / MplusAutomation

The MplusAutomation package leverages the flexibility of the R language to automate latent variable model estimation and interpretation using Mplus, a powerful latent variable modeling program developed by Muthen and Muthen (www.statmodel.com). Specifically, MplusAutomation provides routines for creating related groups of models, running batches of models, and extracting and tabulating model parameters and fit statistics.
84 stars 46 forks source link

Possible to iterate over classes with different variance structures? #180

Closed reytla closed 1 year ago

reytla commented 1 year ago

Dear all,

I was wondering if it is indeed possible to iterate over the number of classes in such a way that each class has a freely estimated mean & variance structure. As an example, within the mplusObject, in the MODEL statement is it possible for a 1 class model to be created such that:

MODEL: %c#1% [X1-X10];
X1-X10;

and a 2-class model will be:

MODEL: %c#1% [X1-X10];
X1-X10;

%c#2% [X1-X10];
X1-X10;

cjvanlissa commented 1 year ago

Yes, this is what createMixtures() does. Check the documentation!