Would you please help me on the following question?
I want to look at the effect of x on y. I suspect that x affects y in 4 ways: (1) a direct effect, (2) an indirect effect through a, (3) an indirect effect through b, and (4) an indirect effect through c. I have a set of control variables, and instrumental variable a1 for a, b1 for b, and c1 for c.
I run the following code:
gsem (a <- a1 x controls) (b<-b1 x controls) (c<-c1 x controls) (y <- a b c x controls)
Then I calculate the following:
(2) indirect effect through a
nlcom _b[y:a]*_b[a:x]
(3) indirect effect through b
nlcom _b[y:b]*_b[b:x]
(4) indirect effect through c
nlcom _b[y:c]*_b[c:x]
Total effect
nlcom _b[y:x]+(2)+(3)+(4)
Could you please advise me if the above procedure is correct?
Thank you.
Related Posts with GSEM with multiple moderators
Problem while using xtfmb (Fama-MacBeth (1973)) on dummy variablesDear Stata community, I am new to this forum and I have a question that I hope you might be able to…
how to set a dummy to arrange datahello I have a question needs to help. Z code mode I want to category Z variable below as gen zcode …
Treatment effect significant for a subpopulation?We analyse the effect of a policy change in soccer on the incidence of injuries. Due to our theoreti…
Sign change from margins dydx to margins dyex ?Hello everyone, I am running a logit model in which I try to forecast insolvency. The coefficients …
tsfillHello everyone, in my dataset i was having the gaps between dates so i decided to use tsfill comman…
Subscribe to:
Post Comments (Atom)
0 Response to GSEM with multiple moderators
Post a Comment