Learn R Programming

MBESS (version 4.1.0)

mediation.effect.plot: Visualizing mediation effects

Description

Create a mediation effect plot

Usage

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, ...)

Arguments

x
vector of the predictor/independent variable
mediator
vector of the mediator variable
dv
vector of the dependent/outcome variable
ylab
y-axis title label
xlab
x-axis title label
main
main title label
pct.from.top.a
figure fine tuning adjustment
pct.from.left.c
figure fine tuning adjustment
arrow.length.a
figure fine tuning adjustment
arrow.length.c
figure fine tuning adjustment
legend.loc
specify the location of the legend
file
file name of the plot to be saved (not necessary)
pch
plotting character
xlim
limits for the x-axis
ylim
limits for the y-axis
save.pdf
TRUE or FALSE if the produced figure should be saved as a PDF file
save.eps
TRUE or FALSE if the produced figure should be saved as an EPS file
save.jpg
TRUE or FALSE if the produced figure should be saved as a JPG file
...
to incorporate options from interval functions

Value

A figure is returned.

Details

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.

References

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.

See Also

mediation.effect.plot, mediation.effect.bar.plot