Interaction terms between latent factors and an observed varaible

111 views
Skip to first unread message

ahmad

unread,
Jul 3, 2025, 9:18:12 AM7/3/25
to lavaan
Hi, 

I want to test the moderation effect of an observed continuous variable W (a single continuous factor score) on the relationship between latent variables X1 (measured by 4 continuous indicators using parcelling) and X2 (measured by 5 ordinal items), and the outcome Y (measured by 10 binary indicators). This relationship is mediated by a latent mediator M (measured by 10 binary indicators). I plan to use Model 15 from the conditional process framework in lavaan.

My goal is to create interaction terms between X1/W, X2/W, and M/W to test moderation effects. However, I realised that creating product terms between the binary indicators of the latent mediator M and the continuous observed moderator W is not appropriate.

I’m now wondering how to properly create and test these interaction terms using lavaan, given the challenges with product terms involving binary indicators.


Best,

Ahmad



Shu Fai Cheung (張樹輝)

unread,
Jul 3, 2025, 9:42:42 AM7/3/25
to lavaan
How about this method?

Rosseel, Y., Burghgraeve, E., Loh, W. W., & Schermelleh-Engel, K. (2025). Structural after measurement (SAM) approaches for accommodating latent quadratic and interaction effects. Behavior Research Methods, 57(4), 101. https://doi.org/10.3758/s13428-024-02532-y

From Discussion: "Although not investigated in this paper, our LSAM method is also applicable when the indicators of latent variables are binary or ordinal. The only adjustment needed is to account for the categorical nature of these variables when estimating the measurement model, while the second step remains unchanged."

-- Shu Fai

ahmad

unread,
Jul 3, 2025, 1:20:26 PM7/3/25
to lavaan
Thank you, Shu Fai for your response. In the paper, they worked with the interaction of latent variables, while my moderator is an observed variable, so I am not sure it is still applicable to my case. 

Best,
Ahmad

Yves Rosseel

unread,
Jul 3, 2025, 1:46:44 PM7/3/25
to lav...@googlegroups.com
On 7/3/25 7:20 PM, ahmad wrote:
> Thank you, Shu Fai for your response. In the paper, they worked with the
> interaction of latent variables, while my moderator is an observed
> variable, so I am not sure it is still applicable to my case.

It should work. Observed variables are simply upgraded to latent
variables with a single indicator (and zero measurement error).

Yves.

Shu Fai Cheung (張樹輝)

unread,
Jul 3, 2025, 6:01:49 PM7/3/25
to lavaan
Yves already addressed your concern about observed variables. But I am curious. You mentioned that W, the observed variable, is a "single continuous factor score." Does it mean that it also has items/indicators? If you use SAM, how about using the items/indicators directly instead of using the factor score?

-- Shu Fai

Yves Rosseel

unread,
Jul 4, 2025, 5:48:58 AM7/4/25
to lav...@googlegroups.com
Perhaps I should also mention that in the latest github version of
lavaan, we now provide analytic standard errors for the approach
described in this paper:

> Rosseel, Y., Burghgraeve, E., Loh, W. W., & Schermelleh-Engel, K.
> (2025). Structural after measurement (SAM) approaches for accommodating
> latent quadratic and interaction effects. /Behavior Research
> Methods/, /57/(4), 101. https://doi.org/10.3758/s13428-024-02532-y
> <https://doi.org/10.3758/s13428-024-02532-y>

They are of course much faster than the bootstrap method, and seem to
result in comparable results. (A follow-up paper about this is in
preparation).

Yves.

Shu Fai Cheung

unread,
Jul 4, 2025, 6:02:48 AM7/4/25
to lav...@googlegroups.com
Wow! Thanks a lot for adding this feature! Fantastic! Will try it out soon.

Although some of my works are about bootstrapping, I like analytic
solutions more. I look forward to reading this paper when it is
published!

Regards,
Shu Fai
> --
> 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/084fd0bc-90eb-4aea-a582-4dc526f39fd8%40gmail.com.

ahmad

unread,
Jul 4, 2025, 1:11:40 PM7/4/25
to lavaan
Thank you both!

I'm working with multiply imputed datasets, and I'm unsure whether the SAM approach can be applied in this context. Additionally, the moderator in my model has many indicators, making it difficult to create product terms between the indicators of two latent IVs and the mediator's indicators, both in the SEM model and in the imputation model.

My questions are as follows:
Can I create a factor score for the moderator (modelled as a second-order factor) and then use those scores (treated as observed variables) to create product terms with the IVs and mediators while one of the IVs has continuous indicators (using parcelling), the other IV has ordinal indicators (coded 0, 1, 2), and the mediator's indicators are binary?

Alternatively, would it be more appropriate to use the first-order latent factors of the moderator (3 factors) to create product terms, i.e., use their factor scores as observed variables? This would significantly increase the number of product terms, but it may allow for interactions between latent variables, while still using observed proxies (factor scores). 

The second-order factor score approach simplifies the number of product terms, but it may be problematic to create interaction terms where one variable is a latent construct (with indicators) and the other is a single observed variable (the factor score). I'm not entirely sure whether this mismatch is methodologically acceptable. In contrast, the first-order factor score approach allows for interaction terms between multiple latent constructs by treating their factor scores as observed variables. However, this comes at the cost of increased complexity in both the SEM model and the imputation model.

My main questions are:
Are these approaches acceptable in practice, or are there better alternatives for handling this kind of scenario, especially when working with latent interaction terms, non-continuous indicators, and multiple imputation?

I would greatly appreciate any advice or suggestions on how best to approach this.


Best wishes,
Ahmad



Reply all
Reply to author
Forward
0 new messages