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.

"

Wmoderates the path fromAtoY" is just another way of saying "Yis being regressed onto an interaction betweenAandW". I think the easiest thing to do would be to just make a new variable which is the product ofAandW--say,AxW--and make paths fromA,W, andAxWtoY.Thank you, that's what I was looking for. All the best!

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 variableW 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.