Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: SEM with bootstrapping for analysis of mediation

From   William Buchanan <>
Subject   Re: st: SEM with bootstrapping for analysis of mediation
Date   Tue, 19 Jun 2012 09:06:23 -0700

Hi Neeraj,

The program that you mentioned is typed out explicitly for you on the site that you referenced:

program indireff, rclass
  sem (read <- math)(science <- read math)
  estat teffects
  mat bi = r(indirect)
  mat bd = r(direct)
  mat bt = r(total)
  return scalar indir  = el(bi,1,3)
  return scalar direct = el(bd,1,3)
  return scalar total  = el(bt,1,3)

Copy the syntax (with appropriate substitution of variable names and returned scalars) and save it as indireff.ado in your Personal directory of your Stata installation, then run it the same way that they outlined on the website.  If you have difficulty with things, you should look at the programming manual and the material about referencing individual elements in matrices (so you can pull out the correct scalars).


On Jun 19, 2012, at 8:56 AM, Iyer, Neeraj N wrote:

> Hello Stata users,
> I am conducting a Structural Equation Modeling (sem) for analysis of mediation.  I would like to obtain bootstrap standard errors and confidence intervals.  Does anyone have experience calculating bootstrap intervals for testing indirect effects.
> I did find description of the program "indireff.ado" on but was unable to locate the the .ado file.  Any guidance regarding the download or the procedure would be appreciated. 
> Thanks in advance.
> Regards,
> Neeraj
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index