Dear all,
I'd like to perform a mediation analysis using a fixed effects regression model. My understanding is, that I 1) calculate the base model without the moderator 2) calculate a FE regression of the IVs on the moderator and 3) the full model of the IVs and the moderator on the DV and than check wether the indirect effect is significant using bootstrapping. I have calculated the following so far:
But the bootstrapping does not work and I think I haven't completely understood how the command works.
So I have 2 questions:
1) Is the overall approach correct?
2) How do I have to adapt the bootstrapping command? As mentioned I try to answer the question whether the indirect/directeffect is significant and what extend of the total effect is explained via the indirect/direct effect
Thanks a lot in advance!
P.S. I'm using Stata 13 on Windows
I'd like to perform a mediation analysis using a fixed effects regression model. My understanding is, that I 1) calculate the base model without the moderator 2) calculate a FE regression of the IVs on the moderator and 3) the full model of the IVs and the moderator on the DV and than check wether the indirect effect is significant using bootstrapping. I have calculated the following so far:
Code:
egen companyid = group(Company), label lname(companyid) xtset companyid PeriodQ * Total Effect (Dependent Variable on Independent Variable:) xtreg DV $IVs $controls i.year, fe vce(robust) *IV regressed on Mediator (path a) xtreg M $IVs $controls i.year, fe vce(robust) * Dependen Variable regressed on mediator and independen variable xtreg DV $IVs $controls M i.year, fe vce(robust) * Check significance via Bootstrap xtset, clear bootstrap ([M]_b[IV]*[DV]_b[M]), bca reps(1000) nodots cluster(companyid) : xtreg (M $IVs $controls)(DV M $IVs $controls) `if' `in' estat boot, percentile bc bca
So I have 2 questions:
1) Is the overall approach correct?
2) How do I have to adapt the bootstrapping command? As mentioned I try to answer the question whether the indirect/directeffect is significant and what extend of the total effect is explained via the indirect/direct effect
Thanks a lot in advance!
P.S. I'm using Stata 13 on Windows
Comment