Simple Mediation Models

Share:

Description

Computes the Indirect Effect for a simple 3 variable mediation model: X -> M -> Y assuming direct effect X -> Y

Usage

1

Arguments

data

data.frame containing the variables labeled 'x', 'm', and 'y' respectively.

Details

This function computes all paths in the simple 3 variable system involving the following regressions:
Y = t'X + bM, and
M = aX
where t' + ab = t

The indirect effect is computed as the product of a*b. Several formula are used for the computation of the standard error for the indirect effect (see MacKinnon et al for a comprehensive review).
As noted below, one can use this function to create the indirect effect and then utilize bootstrapping for a more accurate estimate of the standard error and model the distribution of the direct effect.

Value

Creates a table containing the following effects, their standard errors, and t-values :

a

Effect of X on M

b

Effect of M on Y controlling for X

t

Total effect of X on Y

t'

Direct effect of X on Y accounting for M

ab

Indirect effect of X on Y though M

Aroian

Standard error of ab using Aroian method

Goodman

Standard error of ab using Goodman method

Med.Ratio

Mediation Ratio: indirect effect / total effect

Warning

This function is primative in that it is based on a simplistic model AND forces the user to name the variables in the dataset x, m, and y.

Note

This function uses the following undocumented functions: aroian.se.indirect2, goodman.se.indirect2, se.indirect2

Author(s)

Thomas D. Fletcher tom.fletcher.mp7e@statefarm.com

References

MacKinnon, D. P., Lockwood, C. M., Hoffman, J. M., West, S. G., & Sheets, V. (2002). A comparison of methods to test mediation and other intervening variable effects. Psychological Methods, 7, 83-104.

See Also

distal.med, proxInd.ef

Examples

1
2
3
4
data(tra)
tmp.tra <- tra
names(tmp.tra) <- c('x','z','m','y')
data.frame(proximal.med(tmp.tra))  ## data.frame() simple makes the table 'pretty'