mediation | R Documentation |
Return all direct and indirect effects within a recursive path model.
mediation(
model,
data = NULL,
stat = all_indirect,
nrep = 5000,
alpha = 0.05,
standardized = FALSE
)
model |
an object of class |
data |
an optional data frame, list or environment (or object coercible by |
stat |
A function for the statistics to compute either |
nrep |
Number of repetitions for the boostrap. Default is 5000. |
alpha |
Type I error rate to build the |
standardized |
Option to get standardized coefficients. |
Basically, mediation
is a wrapper for the boot
function from the pathanalysis
package.
The mediation analysis
mediation(model = y ~ m2 ~ m1 ~ x, data = medEX, standardized = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.