To whom that has the expertise on the above questions,
I used bootstrap methods to test the significance of a hypothesized mediation process with the following commands.
"capture program drop bootmm
program bootmm, rclass
syntax [if] [in]
sureg (mediator IV controlled_variables i.company i.year) (DV mediator IV controlled_variables i.company i.year) `if' `in'
return scalar indtotal = [mediator]_b[IV]*[DV]_b[mediator]
return scalar dir=[DV]_b[IV]
end
bootstrap r(indtotal) r(dir), bca reps(5000) nodots: bootmm
estat boot, percentile bc bca
Now I need to graph two figures: (1) distribution of values of indirect effect estimates and (2) distribution of values of effect ratio. Attached are examples of these two figures from Shrout and Bolger (2002), corresponding to the following result of bootstrap analysis.
Refer to: Shrout, P. E., & Bolger, N. (2002). Mediation in experimental and nonexperimental studies: new procedures and recommendations. Psychological Methods, 7(4), 422.



How to obtain these figures with Stata?
Thank you!
Best regards,
Elaine
I used bootstrap methods to test the significance of a hypothesized mediation process with the following commands.
"capture program drop bootmm
program bootmm, rclass
syntax [if] [in]
sureg (mediator IV controlled_variables i.company i.year) (DV mediator IV controlled_variables i.company i.year) `if' `in'
return scalar indtotal = [mediator]_b[IV]*[DV]_b[mediator]
return scalar dir=[DV]_b[IV]
end
bootstrap r(indtotal) r(dir), bca reps(5000) nodots: bootmm
estat boot, percentile bc bca
Now I need to graph two figures: (1) distribution of values of indirect effect estimates and (2) distribution of values of effect ratio. Attached are examples of these two figures from Shrout and Bolger (2002), corresponding to the following result of bootstrap analysis.
Refer to: Shrout, P. E., & Bolger, N. (2002). Mediation in experimental and nonexperimental studies: new procedures and recommendations. Psychological Methods, 7(4), 422.
How to obtain these figures with Stata?
Thank you!
Best regards,
Elaine
Comment