Looking for help with including a moderator to a path model

Attachment | Size |
---|---|
5kpvC.png | 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.
Could anyone please give me a helpful hand?
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.
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_.
Log in or register to post comments
In reply to new variable? by AdminRobK
Thank you, that's what I was
Thank you, that's what I was looking for. All the best!
Log in or register to post comments
In reply to Thank you, that's what I was by blazej
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.
Log in or register to post comments