Hello,
I am currently looking for some guidance regarding how to correctly estimate indirect effects using the xtdpdml shell for SEM. I have panel data on the country level for t=5, thus requiring the xtdpdml command.
Assuming a simplified example from my research question, the regression using SEM would look somewhat like this. rch_nrg is Y, grwth_epriceres_cent is M and grwth_metalseur is the explanatory variable X.
From what I've read from the work of Richard Williams, Paul D. Allison and Enrique Moral-Benito as well as other entries in the forum, I cannot use the standard SEM command given that I deal with panel data. Thus, I am using the xtdpdml command. Similar to the SEM code above, I've run the code
This then gives me the following SEM code:
However, despite the general information available on this command, it is not clear to me how estimate the indirect effect. Based on my understanding of SEM and xtdpdml, this only gives me the direct effect of both my X and M variable on Y. Would estimating the indirect effect, similar to the first code of SEM, then require me to "manually" insert the code for estimating X on M into the code above? Something along the lines of:
Does this make sense or is there another way estimating the indirect effect using the xtdpdml command that I have not (yet) come across?
Thank you very much in advance!
I am currently looking for some guidance regarding how to correctly estimate indirect effects using the xtdpdml shell for SEM. I have panel data on the country level for t=5, thus requiring the xtdpdml command.
Assuming a simplified example from my research question, the regression using SEM would look somewhat like this. rch_nrg is Y, grwth_epriceres_cent is M and grwth_metalseur is the explanatory variable X.
Code:
sem (grwth_epriceres_cent -> rch_nrg, ) (grwth_metalseur -> rch_nrg, ) (grwth_metalseur -> grwth_epriceres_cent, ), nocapslatent
Code:
xtset countryID timeID xtdpdml rch_nrg grwth_epriceres_cent grwth_metalseur, ylag(1) tsoff tfix vce(oim) difficult showcmd
Code:
sem (rch_nrg2 <- rch_nrg1@b1 grwth_epriceres_cent2@b2 grwth_metalseur2@b3 Alpha@1 ) (rch_nrg3 <- rch_nrg2@b1 grwth_epriceres_cent3@b2 grwth_metalseur3@b3 Alpha@1 ) (rch_nrg4 <- rch_nrg3@b1 grwth_epriceres_cent4@b2 grwth_metalseur4@b3 Alpha@1 ) (rch_nrg5 <- rch_nrg4@b1 grwth_epriceres_cent5@b2 grwth_metalseur5@b3 Alpha@1 ) (rch_nrg6 <- rch_nrg5@b1 grwth_epriceres_cent6@b2 grwth_metalseur6@b3 Alpha@1 ), var(Alpha) difficult iterate(250) technique(nr 25 bhhh 25) noxconditional vce(oim)
Code:
sem (rch_nrg2 <- rch_nrg1@b1 grwth_epriceres_cent2@b2 grwth_metalseur2@b3 Alpha@1 ) (rch_nrg3 <- rch_nrg2@b1 grwth_epriceres_cent3@b2 grwth_metalseur3@b3 Alpha@1 ) (rch_nrg4 <- rch_nrg3@b1 grwth_epriceres_cent4@b2 grwth_metalseur4@b3 Alpha@1 ) (rch_nrg5 <- rch_nrg4@b1 grwth_epriceres_cent5@b2 grwth_metalseur5@b3 Alpha@1 ) (grwth_epriceres_cent <- grwth_metalseur2@b1 Alpha@1 ) (grwth_epriceres_cent <- grwth_metalseur3@b1 Alpha@1 ) (grwth_epriceres_cent <- grwth_metalseur4@b1 Alpha@1 ) (grwth_epriceres_cent <- grwth_metalseur5@b1 Alpha@1 ), var(Alpha) difficult iterate(250) technique(nr 25 bhhh 25) noxconditional vce(robust)
Thank you very much in advance!
Comment