Bookmark and Share

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


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

Re: st: SEM with bootstrapping for analysis of mediation


From   William Buchanan <[email protected]>
To   [email protected]
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)
end

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).

HTH,
Billy



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 http://www.ats.ucla.edu/stat/stata/faq/sem_mediation.htm 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:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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