Statalist


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

Re: st: Fw: Multiple mediation


From   John Antonakis <[email protected]>
To   [email protected]
Subject   Re: st: Fw: Multiple mediation
Date   Sat, 07 Feb 2009 00:05:50 +0100

Nice!

Thanks,
John.


On 06.02.2009 23:28, Maarten buis wrote:
--- On Fri, 6/2/09, John Antonakis wrote:
Anyway.....is the procedure you show using the delta method
to calculate the significance of the indirect path?

Yes
Also, how would one bootstrap the SE of the indirect path?

*------------------ begin example ----------------------
use http://www.ats.ucla.edu/stat/stata/notes/hsb2, clear
foreach var of varlist read ses write {
    sum `var' if !missing(read,ses,write)
    gen double z_`var' = (`var' - r(mean))/r(sd)
}

capture program drop indir
program define indir, rclass
	tempname b
	reg z_read z_ses
	scalar `b' = _b[z_ses]
	reg z_write z_read z_ses
	return scalar indir = _b[z_read]*`b'
end
indir
bootstrap indir=r(indir), reps(1000): indir
estat bootstrap, bc p norm

qui sureg (z_read z_ses) (z_write z_read z_ses)
nlcom  [z_read]z_ses*[z_write]z_read
*--------------- end example ---------------------------
(For more on how to use examples I sent to the Statalist, see
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )

-- Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room N515

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index