Automate the process of simple mediation analysis (one independent variable and one mediator) and effect size estimation for mediation models, as discussed in Preacher and Kelley (2011).
mediation(x, mediator, dv, S = NULL, N = NULL, x.location.S = NULL,
mediator.location.S = NULL, dv.location.S = NULL, mean.x = NULL,
mean.m = NULL, mean.dv = NULL, conf.level = 0.95,
bootstrap = FALSE, B = 10000, which.boot="both", save.bs.replicates=FALSE,
complete.set=FALSE)
Regression table of Y
conditional on X
Summary of model fit for the regression of Y
conditional on X
Regression table of X
conditional on M
Summary of model fit for the regression of X
conditional on M
Regression table of Y
conditional on X
and M
Summary of model fit for the regression of Y
conditional on X
and M
the product of \(\hat{a} \times \hat{b}\), where \(\hat{a}\) and \(\hat{b}\) are the estimated coefficients of the path from the independent variable to the mediator and the path from the mediator to the dependent variable
It is the indirect effect (see Indirect.Effect
above) divided by the estimated standard deviation of Y
(MacKinnon, 2008)
Index of mediation (indirect effect multiplied by the ratio of the standard deviation of X to the standard deviation of Y) (Preacher and Hayes, 2008)
An index of explained variance see MacKinnon (2008, Eq. 4.5) for details
An index of explained variance see MacKinnon (2008, Eq. 4.6) for details
An index of explained variance see MacKinnon (2008, Eq. 4.7) for details
the maximum attainable value of the mediation effect (i.e., the indirect effect), in the direction of the observed indirect effect, that could have been observed, conditional on the sample variances and on the magnitudes of relationships among some of the variables
the proportion of the maximum possible indirect effect; Uses the indirect effect in the numerator with the maximum possible mediation effect in the denominator (Preacher & Kelley, 2010)
ratio of the indirect effect to the total effect (Freedman, 2001); also known as mediation ratio (Ditlevsen, Christensen, Lynch, Damsgaard, & Keiding, 2005); in epidemiological research and as the relative indirect effect (Huang, Sivaganesan, Succop, & Goodman, 2004); often loosely interpreted as the relative indirect effect
ratio of the indirect effect to the direct effect (Sobel, 1982)
Success of a surrogate endpoint (Buyse & Molenberghs, 1998)
shared over simple effects (SOS) index, which is the ratio of the variance in Y explained by both X
and M
divided by the variance in Y
explained by X
(Lindenberger & Potter, 1998)
A residual based index (Preacher & Kelley, 2010)
A residual based index that is standardized, where the scales of M and Y are removed by using standardized values of M and Y (Preacher & Kelley, 2010)
When X is 0 and 1 representing a two group structure, Hansen and McNeal's (1996) Effect Size Index for Two Groups
vector of the predictor/independent variable
vector of the mediator variable
vector of the dependent/outcome variable
Covariance matrix
Sample size, necessary when a covariance matrix (S
) is used
location of the predictor/independent variable in the covariance matrix (S
)
location of the mediator variable in the covariance matrix (S
)
location of the dependent/outcome variable in the covariance matrix (S
)
mean of the x
(independent/predictor) variable when a covariance matrix (S
) is used
mean of the m
(mediator) variable when a covariance matrix (S
) is used
mean of the y/dv
(dependent/outcome) variable when a covariance matrix (S
) is used
desired level of confidence (e.g., .90, .95, .99, etc.)
TRUE
or FALSE
, based on whether or not a bootstrap procedure is performed to obtain confidence intervals for the various effect sizes
number of bootstrap replications when bootstrap=TRUE
(e.g., 10000)
which bootstrap method to use. It can be Percentile
or BCa
, or both
Logical argument indicating whether to save the each bootstrap sample or not
identifies if the function should report the estimated kappa.squarred (see below)
Ken Kelley (University of Notre Dame; KKelley@nd.edu)
Based on the work of Preacher and Kelley (2010) and works cited therein, this function implements (simple) mediation analysis in a way that automates much of the results that are generally of interest, where "simple" means one independent variable, one mediator, and one dependent variable. More specifically, three regression outputs are automated as is the calculation of effect sizes that are thought to be useful or potentially useful in the context of mediation. Much work on mediation models exists in the literature, which should be consulted for proper interpretation of the effect sizes, models, and meaning of results. The usefulness of effect size \(\kappa^2\) was called into question by Wen and Fan (2015). Further, another paper by Lachowicz, Preacher, and Kelley (submitted) offers a better was of quantifying the effect size and it is developed for more complex models. Users are encouraged to use, instead of or in addition to this function, the upsilon function.
Buyse, M., & Molenberghs, G. (1998). Criteria for the validation of surrogate endpoints in randomized experiments. Biometrics, 54, 1014--1029.
Ditlevsen, S., Christensen, U., Lynch, J., Damsgaard, M. T., & Keiding, N. (2005). The mediation proportion: A structural equation approach for estimating the proportion of exposure effect on outcome explained by an intermediate variable. Epidemiology, 16, 114--120.
Freedman, L. S. (2001). Confidence intervals and statistical power of the 'Validation' ratio for surrogate or intermediate endpoints. Journal of Statistical Planning and Inference, 96, 143--153.
Hansen, W. B., & McNeal, R. B. (1996). The law of maximum expected potential effect: Constraints placed on program effectiveness by mediator relationships. Health Education Research, 11, 501--507.
Huang, B., Sivaganesan, S., Succop, P., & Goodman, E. (2004). Statistical assessment of mediational effects for logistic mediational models. Statistics in Medicine, 23, 2713--2728.
Lachowicz, M. J., Preacher, K. J., & Kelley, K. (submitted). A novel measure of effect size for mediation analysis. Submited for publication.
Lindenberger, U., & Potter, U. (1998). The complex nature of unique and shared effects in hierarchical linear regression: Implications for developmental psychology. Psychological Methods, 3, 218--230.
MacKinnon, D. P. (2008). Introduction to statistical mediation analysis. Mahwah, NJ: Erlbaum.
Preacher, K. J., & Hayes, A. F. (2008b). Asymptotic and resampling strategies for assessing and comparing indirect effects in multiple mediator models. Behavior Research Methods, 40, 879--891.
Preacher, K. J., & Kelley, K. (2011). Effect size measures for mediation models: Quantitative and graphical strategies for communicating indirect effects. Psychological Methods, 16, 93--115.
Sobel, M. E. (1982). Asymptotic confidence intervals for indirect effects in structural equation models. In S. Leinhardt (Ed.), Sociological Methodology 1982 (pp. 290--312). Washington DC: American Sociological Association.
Wen, Z., & Fan, X. (2015). Monotonicity of effect sizes: Questioning kappa-squared as mediation effect size measure. Psychological Methods, 20, 193--203.
mediation.effect.plot
, mediation.effect.bar.plot