# Looking for help with including a moderator to a path model

4 posts / 0 new
Offline
Joined: 11/20/2018 - 05:02
Looking for help with including a moderator to a path model
AttachmentSize
7.35 KB

Greetings,
this is my 1st post, so please forgive me if this is offtopic.

In sort of new to SEM / modelling in general. So far I managed to make some sense of lavaan() syntax in R, to run a path model like this (file attached).

Before introducing the W moderator (continuous) this model was specified (in lavaan) as:

model <- '
X1 ~~ X2
A ~ X1 + X2
Y ~ A'

All variables are observed and continuous.

Now I'm trying to include the moderating effect of W on the effect of A on Y.

I have no clue on how to do it technically - syntax wise, and how to extract all of this from lavaan output for interpretation.

What I'm interested in is: whether or not W serves as a valid moderator and if yes how does it moderate the effect of A on Y.

I have openMX installed in my RStudio and don't mind switching to it - for now, as a beginner I found lavaan's syntax easier to understand.

Offline
Joined: 01/24/2014 - 12:15
new variable?

"W moderates the path from A to Y" is just another way of saying "Y is being regressed onto an interaction between A and W". I think the easiest thing to do would be to just make a new variable which is the product of A and W--say, AxW--and make paths from A, W, and AxW to Y.

Offline
Joined: 11/20/2018 - 05:02
Thank you, that's what I was

Thank you, that's what I was looking for. All the best!

Offline
Joined: 03/01/2013 - 14:09
Another method

If W moderates the effect of A on Y, you could draw two pathways between A and Y: A -> Y and A->D->W, where D is a dummy latent variable with no variance other than that from A. Put the moderation parameter to be estimated on A->D and the definition variable W on A->D. The trick would be to label the path data.W (assuming that W is the moderator’s name in the dataset). The SE, CI or a likelihood ratio test against a model with the moderation parameter fixed to zero would inform about how unlikely the estimate obtained would be if the null hypothesis of no moderation was in fact true.