Description Usage Arguments Value Author(s) References See Also
Function to plot results from mediate
. The vertical axis lists indirect, direct, and total effects and the horizontal axis indicates the respective magnitudes. Most standard options for plot function available.
1 2 3 4 5 6 |
x |
object of class |
treatment |
a character string indicating the baseline treatment value of the estimated causal mediation effect and direct effect to plot. Can be either "control", "treated" or "both". If 'NULL' (default), both sets of estimates are plotted if and only if they differ. |
labels |
a vector of character strings indicating the labels for the estimated effects. The default labels will be used if NULL. |
effect.type |
a vector indicating which quantities of interest to plot. Default is to plot all three quantities (indirect, direct and total effects). |
xlim |
range of the horizontal axis. |
ylim |
range of the vertical axis. |
xlab |
label of the horizontal axis. |
ylab |
label of the vertical axis. |
main |
main title. |
lwd |
width of the horizontal bars for confidence intervals. |
cex |
size of the dots for point estimates. |
col |
color of the dots and horizontal bars for the estimates. |
... |
additional parameters passed to 'plot'. |
mediate
returns an object of class "mediate
". The function summary
is used to obtain a table of the results. The plot
function plots these quantities.
Dustin Tingley, Harvard University, dtingley@gov.harvard.edu; Teppei Yamamoto, Massachusetts Institute of Technology, teppei@mit.edu.
Tingley, D., Yamamoto, T., Hirose, K., Imai, K. and Keele, L. (2014). "mediation: R package for Causal Mediation Analysis", Journal of Statistical Software, Vol. 59, No. 5, pp. 1-38.
Imai, K., Keele, L. and Tingley, D. (2010) A General Approach to Causal Mediation Analysis, Psychological Methods, Vol. 15, No. 4 (December), pp. 309-334.
Imai, K., Keele, L. and Yamamoto, T. (2010) Identification, Inference, and Sensitivity Analysis for Causal Mediation Effects, Statistical Science, Vol. 25, No. 1 (February), pp. 51-71.
Imai, K., Keele, L., Tingley, D. and Yamamoto, T. (2009) "Causal Mediation Analysis Using R" in Advances in Social Science Research Using R, ed. H. D. Vinod New York: Springer.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.