The purpose of the Sobel-Goodman tests are to test whether a mediator
carries the influence of an IV to a DV.
A variable may be considered a mediator to the extent to which it carries
the influence of a given independent variable (IV) to a given dependent
variable (DV). Generally speaking, mediation can be said to occur when (1)
the IV significantly affects the mediator, (2) the IV significantly
affects the DV in the absence of the mediator, (3) the mediator has a
significant unique effect on the DV, and (4) the effect of the IV on the
DV shrinks upon the addition of the mediator to the model.
Options
cv(covarlist) Optional list of covariate variables.
quietly Suppresses the individual regression output.
* bootstrap with case resampling
. bootstrap r(ind_eff) r(dir_eff), reps(1000): sgmediation science,
mv(read) iv(math)
. estat bootstrap, percentile bc
* bootstrap with residual resampling
* need to install resboot_mediation
. findit resboot_mediaton
. resboot_mediation, dv(science) mv(read) iv(math) reps(1000)