Hello everyone, I am stuck on this issue. I am trying to analyze a first stage moderated mediation model as follows
y is a continuous dependent variable
x is a binary response variable
m1, m2 and m3 are continuous mediator variables
w1 is a binary moderator
w2 is a continuous moderator
All variables except w2 are level 1 variables clustered at state level/county level, and I do not mind treating each mediator separately/simultaneously
I would want to carry out a moderated mediation model with within state effects.
I have read several papers but they are quite complex for me. Rockwood here suggests group-centering predictors for each regression. My question is if I do that can I just use the basic gsem syntax as I would do for the single stage model?
I also saw tried the gsem(y<--m1 x cv M1[stateid]) (m1<- x cv M2[stateid]) (M1[stateid]*M2[stateid]@0) like example 42g (two-level model with gsem) for the mediation part of it ... see page 445 here: https://www.stata.com/manuals/sem.pdf
Otherwise is there a canned algorithm that simplifies this?
Thanks in advance
y is a continuous dependent variable
x is a binary response variable
m1, m2 and m3 are continuous mediator variables
w1 is a binary moderator
w2 is a continuous moderator
All variables except w2 are level 1 variables clustered at state level/county level, and I do not mind treating each mediator separately/simultaneously
I would want to carry out a moderated mediation model with within state effects.
I have read several papers but they are quite complex for me. Rockwood here suggests group-centering predictors for each regression. My question is if I do that can I just use the basic gsem syntax as I would do for the single stage model?
I also saw tried the gsem(y<--m1 x cv M1[stateid]) (m1<- x cv M2[stateid]) (M1[stateid]*M2[stateid]@0) like example 42g (two-level model with gsem) for the mediation part of it ... see page 445 here: https://www.stata.com/manuals/sem.pdf
Otherwise is there a canned algorithm that simplifies this?
Thanks in advance