Hi all,
I'm using the binary_mediation command to perform a product of coefficients mediation analysis with six mediating variables, two dichotomous and four continuous.
The command I'm using is...
bootstrap r(indir_1) r(indir_2) r(indir_3) r(indir_4) r(indir_5) r(indir_6) r(tot_ind) r(dir_eff) r(tot_eff), reps(5000): binary_mediation, dv(Y) iv(X) mv(m1 m2 m3 m4 m5 m6) cv(C1)
estat bootstrap, percentile
I'm very happy with interpreting the output, which shows me the observed coefficient and bootstrapped 95% confidence interval.
However, the total indirect effect (tot_ind) gives me the observed coefficient and bootstrapped 95% CI for the sum of all six mediating variables (m1+m2+m3+m4+m5+m6). Only three mediators had a significant a and b coefficient, and while I can manually calculate the sum of the coefficients, I would like to calculate the bootstrapped percentile 95% CI for the sum of these variables (m1+m2+m4) only.
Could anyone please advise if this is possible?
I attempted running...
bootstrap r(indir_1) r(indir_2) r(indir_3) r(indir_4) r(indir_5) r(indir_6) r(indir_1 + indir_2 + indir_4) r(tot_ind) r(dir_eff) r(tot_eff), reps(5000): binary_mediation,, dv(Y) iv(X) mv(m1 m2 m3 m4 m5 m6) cv(C1)
and got the error message
indir_1+indir_2+indir_4 invalid name
error in expression: r(indir_1 + indir_2 + indir_4)
r(198);
I also attempted running a predict command after my original bootstrap
. predict indir_1+indir_2+indir_4
and got the error message
predict is not allowed after bootstrap:binary_mediation
I am also unable to simply include the non-significant mediators as confounders, as stata will include them as confounders of all relationships tested, rather than just the b and c'.
Your thoughts would be greatly appreciated.
Kind regards,
Emma.
I'm using the binary_mediation command to perform a product of coefficients mediation analysis with six mediating variables, two dichotomous and four continuous.
The command I'm using is...
bootstrap r(indir_1) r(indir_2) r(indir_3) r(indir_4) r(indir_5) r(indir_6) r(tot_ind) r(dir_eff) r(tot_eff), reps(5000): binary_mediation, dv(Y) iv(X) mv(m1 m2 m3 m4 m5 m6) cv(C1)
estat bootstrap, percentile
I'm very happy with interpreting the output, which shows me the observed coefficient and bootstrapped 95% confidence interval.
However, the total indirect effect (tot_ind) gives me the observed coefficient and bootstrapped 95% CI for the sum of all six mediating variables (m1+m2+m3+m4+m5+m6). Only three mediators had a significant a and b coefficient, and while I can manually calculate the sum of the coefficients, I would like to calculate the bootstrapped percentile 95% CI for the sum of these variables (m1+m2+m4) only.
Could anyone please advise if this is possible?
I attempted running...
bootstrap r(indir_1) r(indir_2) r(indir_3) r(indir_4) r(indir_5) r(indir_6) r(indir_1 + indir_2 + indir_4) r(tot_ind) r(dir_eff) r(tot_eff), reps(5000): binary_mediation,, dv(Y) iv(X) mv(m1 m2 m3 m4 m5 m6) cv(C1)
and got the error message
indir_1+indir_2+indir_4 invalid name
error in expression: r(indir_1 + indir_2 + indir_4)
r(198);
I also attempted running a predict command after my original bootstrap
. predict indir_1+indir_2+indir_4
and got the error message
predict is not allowed after bootstrap:binary_mediation
I am also unable to simply include the non-significant mediators as confounders, as stata will include them as confounders of all relationships tested, rather than just the b and c'.
Your thoughts would be greatly appreciated.
Kind regards,
Emma.
Comment