add_index | R Documentation |
add_index
is a generic function that adds a
(moderated) indirect effect index to an object created with an mdt_*
family function. This index is computed using Monte Carlo methods. This
function invokes particular methods depending of the class of the mediation
model. For example, with a model fitted with mdt_simple
,
add_index
will invoke
add_index.simple_mediation
.
add_index(mediation_model, times = 5000, level = 0.05, ...)
mediation_model |
A mediation model fitted with an |
times |
Number of simulations to use to compute the Monte Carlo index's confidence interval. |
level |
Alpha threshold to use for the confidence interval. |
... |
Further arguments to be passed to specific methods. |
An object of the same class as mediation_model
, but with index
added for later use.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.