Dear all,
I struggle with calculating the bootstrapped percentile confidence intervals for a standardized indirect effect after running sem in Stata 14. So far, I only managed to get bootstrapped percentile CIs for the unstandardized indirect effect with the following code:
I tried to get the confidence intervals for the standardized effect by modifying one line in the code (highlighted in bold):
However, it seems that the combined use of estat stdize and return is not allowed.
Thank you in advance for your valuable help!
Daniel
I struggle with calculating the bootstrapped percentile confidence intervals for a standardized indirect effect after running sem in Stata 14. So far, I only managed to get bootstrapped percentile CIs for the unstandardized indirect effect with the following code:
Code:
capture program drop bootmm program bootmm, rclass sem (X -> x1 x2 x3) /// (M1 -> m11 m12 m13 m14) /// (M2 -> m21 m22 m23 m24) /// (Y -> y1 y2 y3 y4), vce(sbentler) cov(e.M1*e.M2) standardized return scalar ind1 = (_b[M1:X] * _b[Y:M1]) end bootstrap r(ind1), reps(2000): bootmm estat boot, percentile
Code:
capture program drop bootmm program bootmm, rclass sem (X -> x1 x2 x3) /// (M1 -> m11 m12 m13 m14) /// (M2 -> m21 m22 m23 m24) /// (Y -> y1 y2 y3 y4), vce(sbentler) cov(e.M1*e.M2) standardized estat stdize: return scalar ind1 = (_b[M1:X] * _b[Y:M1]) end bootstrap r(ind1), reps(2000): bootmm estat boot, percentile
Thank you in advance for your valuable help!
Daniel
