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

Re: st: Fw: Multiple mediation

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



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

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

*------------------ begin example ----------------------
use, 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'
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 )

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

*   For searches and help try:
*   For searches and help try:

© Copyright 1996–2023 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index