add_index.moderated_mediation {JSmediation} | R Documentation |
add_index method for moderated mediation
Description
Adds the confidence interval for the index of moderated
mediation to a model fitted with mdt_moderated
.
Usage
## S3 method for class 'moderated_mediation'
add_index(mediation_model, times = 5000, level = 0.05, stage = NULL, ...)
Arguments
mediation_model |
A mediation model of class
|
times |
Number of simulations to use to compute the Monte Carlo indirect effect confidence interval. |
level |
Alpha threshold to use for the confidence interval. |
stage |
Moderated indirect effect's stage for which to compute the
confidence interval. Can be either |
... |
Further arguments passed to or from other methods. |
Details
Indirect effect moderation index for moderated mediation uses
a
, a \times Mod
, b
, and b \times Mod
estimates and their standard errors to compute the appropriate index
product distribution using Monte Carlo methods (see Muller, Judd, &
Yzerbyt, 2005).
JSmediation supports different types of mediated indirect effect index:
-
Stage 1: computes the product between
a \times Mod
andb
. -
Stage 2: computes the product between
a
andb \times Mod
. -
Total: computes the sum of Stage 1 and Stage 2 distribution.
References
Muller, D., Judd, C. M., & Yzerbyt, V. Y. (2005). When moderation is mediated and mediation is moderated. Journal of Personality and Social Psychology, 89(6), 852-863. doi: 10.1037/0022-3514.89.6.852
Examples
## getting a stage 1 moderated indirect effect index
ho_et_al$condition_c <- build_contrast(ho_et_al$condition,
"Low discrimination",
"High discrimination")
ho_et_al <- standardize_variable(ho_et_al, c(linkedfate, sdo), suffix ="c")
moderated_model <- mdt_moderated(data = ho_et_al,
IV = condition_c,
DV = hypodescent,
M = linkedfate_c,
Mod = sdo_c)
add_index(moderated_model, stage = 1)