neg.esm | R Documentation |
Function computes the equivalence testing method (total effect) for evaluating substantial mediation and Kenny method for full mediation.
neg.esm(
X,
Y,
M,
alpha = 0.05,
minc = 0.15,
eil = -0.15,
eiu = 0.15,
nboot = 1000L,
data = NULL,
plot = TRUE,
saveplot = FALSE,
seed = NA
)
## S3 method for class 'neg.esm'
print(x, ...)
X |
predictor variable |
Y |
outcome variable |
M |
mediator variable |
alpha |
alpha level (default = .05) |
minc |
minimum correlation between x and Y (default is .15) |
eil |
lower bound of equivalence interval in standardized units(default is -.15) |
eiu |
upper bound of equivalence interval in standardized units (default is .15) |
nboot |
number of bootstraps (default = 500L) |
data |
optional data argument |
plot |
logical, plotting the results (default = TRUE) |
saveplot |
saving plots (default = FALSE) |
seed |
optional argument to set seed |
x |
object of class |
... |
extra arguments |
This function evaluates whether a negligible direct effect of X on Y exists after controlling for the mediator. Another way to word this is that the indirect effect accounts for a substantial proportion of the variability in X-Y relationship. See Beribisky, Mara, and Cribbie (https://doi.org/10.20982/tqmp.16.4.p424)
The user specifies the IV (X), DV (Y) and mediator (M). The user can also specify the alpha level, the lower/upper bound of the negligible effect interval (eiL, eiU), the number of bootstrap samples (nboot), as well as the minimum correlation between X and Y that is permitted for a valid test of substantial mediation.
The variables X, Y and M can be specified as stand-alone, or a data argument can be used if the data reside in an R dataset.
For the Kenny method see: https://davidakenny.net/cm/mediate.htm
The proportional distance quantifies the proportional distance from 0 to the nearest negligible effect (equivalence) interval (eiL, eiU). As values get farther from 0 the relationship becomes more substantial, with values greater than 1 indicating that the effect falls outside of the negligible effect (equivalence) interval.
Note that the number of bootstrap samples (nboot) are low for the example since the example has a time limit of 5 seconds to pass CRAN testing; we recommend running a much higher number of bootstrap samples for analyses.
A list
including the following:
minc
Minimum correlation between X and Y for a valid negligible effect (equivalence) test
corxy
Sample correlation between the IV (X) and DV (Y)
dir_eff
Sample standardized direct effect between the IV (X) and DV (Y) after controlling for the mediator (M)
eiL
Lower bound of the negligible effect (equivalence) interval
eiU
Upper bound of the negligible effect (equivalence) interval
cil
Lower bound of the 1-2*alpha CI for the standardized direct effect of X on Y
ciu
Upper bound of the 1-2*alpha CI for the standardized direct effect of X on Y
PD
Proportional distance (PD)
cilpd
Lower bound of the 1-alpha CI for the PD
ciupd
Upper bound of the 1-alpha CI for the PD
ab_par
Standardized indirect effect
abdivc_k
Proportion mediated: Standardized indirect effect divided by the standardized total effect
alpha
Nominal Type I error rate
Rob Cribbie cribbie@yorku.ca and Nataly Beribisky natalyb1@yorku.ca
#equivalence test for substantial mediation
#with an equivalence interval of -.15 to .15
X<-rnorm(100,sd=2)
M<-.5*X + rnorm(100)
Y<-.5*M + rnorm(100)
neg.esm(X,Y,M, eil = -.15, eiu = .15, nboot = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.