Create a mediation effect plot
mediation.effect.plot(x, mediator, dv, ylab = "Dependent Variable",
xlab = "Mediator", main = "Mediation Effect Plot",
pct.from.top.a = 0.05, pct.from.left.c = 0.05, arrow.length.a = 0.05,
arrow.length.c = 0.05, legend.loc = "topleft", file = "", pch = 20,
xlim = NULL, ylim = NULL, save.pdf = FALSE, save.eps = FALSE,
save.jpg = FALSE, ...)
vector of the predictor/independent variable
vector of the mediator variable
vector of the dependent/outcome variable
y-axis title label
x-axis title label
main title label
figure fine tuning adjustment
figure fine tuning adjustment
figure fine tuning adjustment
figure fine tuning adjustment
specify the location of the legend
file name of the plot to be saved (not necessary)
plotting character
limits for the x-axis
limits for the y-axis
TRUE
or FALSE
if the produced figure should be saved as a PDF file
TRUE
or FALSE
if the produced figure should be saved as an EPS file
TRUE
or FALSE
if the produced figure should be saved as a JPG file
to incorporate options from interval functions
A figure is returned.
Merrill (1994; see also MacKinnon, 2008; MacKinnon et al., 2007; Sy, 2004) presents a method that involves plotting the indirect effect as the vertical distance between two lines. Fritz and MacKinnon (2008) present a detailed exposition of this method too. Preacher and Kelley (2011) discuss this plotting method and implement their own code, which was also independently done as part of Fritz and MacKinnon (2008).
In this type of plot, the two horizontal lines correspond to the predicted values of Y regressed on X at the mean of X and at one unit above the mean of X. The distance between these two lines is thus \(\hat{c}\). The two vertical lines correspond to predicted values of M regressed on X at the same two values of X. The distance between these lines is \(\hat{a}\). The lines corresponding to the regression of Y on M (controlling for X) are plotted for the same two values of X.
Fritz, M. S., & MacKinnon, D. P. (2008). A graphical representation of the mediated effect. Behavior Research Methods, 40, 55--60.
MacKinnon, D. P. (2008). Introduction to statistical mediation analysis. Mahwah, NJ: Erlbaum.
MacKinnon, D. P., Fairchild, A. J., & Fritz, M. S. (2007). Mediation analysis. Annual Review of Psychology, 58, 593--614.
Merrill, R. M. (1994). Treatment effect evaluation in non-additive mediation models. Unpublished dissertation, Arizona State University.
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.
Sy, O. S. (2004). Multilevel mediation analysis: Estimation and applications. Unpublished dissertation, Kansas State University.