RI-CLPM moderation

41 views
Skip to first unread message

CK

unread,
Jan 20, 2026, 8:07:35 PMJan 20
to lavaan
Hi, Would really appreciate some advice after days of trying to work this out. 

Re: within x within interaction using a within-person time-varying moderator

I aim to examine whether a time-varying within-person variable (M) moderates within person associations between 3 other within-person variables, specifically, whether the relationship between variable (A) at one time point and another variable (B) at the next time point is moderated by the strength of the moderating factor (M). 
I plan to person mean center (from 3 time points) each variable and the moderator to obtain within-person deviation, then calculate observed interaction terms between the variable A and moderator M to examine how M effects the impact A has on B. 

All of the papers I can find use MPlus XWITH to look at this, but I would prefer to use R if anyone knows if this is possible? 

Appreciated!

Jeremy Miles

unread,
Jan 21, 2026, 4:31:13 PMJan 21
to lav...@googlegroups.com
It would be easier to answer with example code.

I don't think there's an exact equivalent to XWITH in Lavaan.  Mplus uses Latent Moderated Structural (LMS) to use XWITH, Lavaan doesn't have this. Instead you need to create the product terms in your data and add constraints. It is not as easy and you need to worry more about multivariate normality (which is handled by Mplus automatically).

Jeremy

--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lavaan/22d586c4-1415-40ef-8c88-558eddfd31f2n%40googlegroups.com.

CK

unread,
Jan 21, 2026, 4:44:18 PMJan 21
to lavaan
Ok that makes sense, thank you for your reply!

Felipe Vieira

unread,
Jan 22, 2026, 7:32:05 AMJan 22
to lav...@googlegroups.com
Completely oblivious to what even goes on in an RI-CPLM moderation, there is a relatively new R package called "modsem", where you can estimate interactions/moderations with LMS. Other approaches are available as well (e.g., QML and UPI-extensions). In fact, the UPI stuff is just a wrapper around lavaan that will help with the constraints specification. You can also estimate interactions/moderations with the LSAM approach (see sam() in lavaan). 

But as I said, I am not really sure what exactly goes on in RI-CPLM (especially in your case). So, I am just suggesting this based on the literature about nonlinear effects among latent variables in general.


CK

unread,
Jan 22, 2026, 3:35:57 PMJan 22
to lavaan
Great thank you, will take a look at that!
Reply all
Reply to author
Forward
0 new messages