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
Creating Lagged variables with repeated valuesDear all, I wanted help in creating lagged variables when there are repeated values in the dataset.…
posterior means for crossed random effects from logistic random intercept modeldear statalist members, I am trying to estimate the posterior means of two crossed random effects f…
Specifying IV with panel data, binary treatment and binary/count outcomeDear all Statalisters I am working on an application of an instrumental variable (IV) approach to a…
Identifying the newly employed receptionist and the waitresses who joined the enterprise after the new receptionist assumed officeHi, I have the follwoing sample: Code: ssc install dataex clear input int year str6 staff_id str5 h…
Multilevel ModelsHi; I am runing runing linear model with four levels. I have not been able to find out what the mean…
Subscribe to:
Post Comments (Atom)
0 Response to GSEM with multiple moderators
Post a Comment