Description Usage Arguments Details Value Author(s) References Examples

View source: R/indirectEffect.R

It estimates the standardized or unstandardized indirect and direct effects and their asymptotic sampling covariance matrix.

1 | ```
indirectEffect(x, n, standardized = TRUE, direct.effect = TRUE, run = TRUE)
``` |

`x` |
A 3x3 correlation/covariance matrix or a list of correlation/covariance matrices. Variables are arranged as the dependent variable (y), mediator (m) and independent variable (x) |

`n` |
Sample size or a vector of sample sizes |

`standardized` |
Logical. Whether the indirect effect is standardized. |

`direct.effect` |
Logical. Whether the direct effect is
estimated. If it is |

`run` |
Logical. If |

Cheung (2009) estimated the standardized indirect effect and
its standard error with non-linear constraints. Since `OpenMx`

does not generate standard errors when there
are non-linear constraints, Kwan and Chan's (2011) approach is used in
this function. Delta method is used to calculate the asymptotic covariance matrix.

A vector (or a matrix if the input is a list of matrices) of (standardized) indirect effect, standardized direct effect, and their asymptotic sampling covariance matrices

Mike W.-L. Cheung <[email protected]>

Cheung, M. W.-L. (2009). Comparison of methods for constructing confidence intervals of standardized indirect effects. *Behavior
Research Methods*, *41*, 425-438.

Kwan, J., & Chan, W. (2011). Comparing standardized coefficients in
structural equation modeling: a model reparameterization
approach. *Behavior Research Methods*, *43*, 730-745.

1 2 3 4 5 6 7 |

```
Loading required package: OpenMx
To take full advantage of multiple cores, use:
mxOption(NULL, 'Number of Threads', parallel::detectCores())
"SLSQP" is set as the default optimizer in OpenMx.
mxOption(NULL, "Gradient algorithm") is set at "central".
mxOption(NULL, "Optimality tolerance") is set at "6.3e-14".
mxOption(NULL, "Gradient iterations") is set at "2".
sh: 1: cannot create /dev/null: Permission denied
sh: 1: wc: Permission denied
ind_eff dir_eff ind_var ind_dir_cov dir_var
0.1132090112 0.0887913809 0.0006683899 -0.0002723687 0.0031515457
ind_eff dir_eff ind_var ind_dir_cov dir_var
[1,] 0.1120879 0.08791209 0.0006980476 -0.0002746040 0.003051160
[2,] 0.1120879 0.08791209 0.0004188285 -0.0001647625 0.001830696
```

metaSEM documentation built on Sept. 29, 2017, 5:07 p.m.

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.