Description Usage Arguments Details Value Warning Note Author(s) References See Also Examples

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

1 |

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

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.

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 |

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.

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

, `goodman.se.indirect2`

, `se.indirect2`

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

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.

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.