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

Multiple conditional tags in createModels #198

Open linem7 opened 8 months ago

linem7 commented 8 months ago

Hi Michael,

Thank you for your work on integrating Mplus with R, it's been invaluable. I'm facing a challenge with the createModels function while creating serial mediation models. I need to exclude models where a variable acts as both an independent variable and a mediator, using conditional tags like [[ivname != m1name]]. Additionally, I'm trying to specify items for analysis but struggle with the conditional logic, which seems to only support "AND" and not "OR".

Could you advise on how to implement an "OR" logic for conditions like "if var1 is an IV, mediator1, or mediator2, then include certain items"? Any guidance would be greatly appreciated.

Best.