Thanks for this detailed feedback, really helpful!
I have one doubt about the computation of quantiles of W.
This is the modified model following your suggestions:
be0 := b * e # W==0
be1 := b * (e + mw) # W==1
be2 := b * (e + 2*mw) # W==2
ce0 := c * e # W==0
ce1 := c * (e + mw) # W==1
ce2 := c * (e + 2*mw) # W==2
de0 := d * e # W==0
de1 := d * (e + mw) # W==1
de2 := d * (e + 2*mw) # W==2
As you said, I can now replace 1 and 2 values with W quantiles in the conditional effects part.
However, I am not sure where to get the quantiles of W. W is a latent variable.
It is computed within the model using the three items w.18, w.19, w.20 present as columns in my dataframe.
I am not sure on how to combine the items above to obtain a column W in the dataframe, to then do:
quantile(df$W, probs = c(.25, .75))
I suppose I can’t create W doing a mean by row of the three items.
If I am not mistaken, using .25 and .75 quantile values would then allow (within the model) to test the conditional indirect effect of X on Y through M, when W is 0, low or high.
Thanks for any help you will provide.