| plot-methods | R Documentation |
Visualize results from (robust) mediation analysis.
## S3 method for class 'fit_mediation'
autoplot(object, which = c("ellipse", "weight"), ...)
## S3 method for class 'test_mediation'
autoplot(object, which = c("ci", "density", "ellipse", "weight"), ...)
## S3 method for class 'fit_mediation'
plot(x, which = c("ellipse", "weight"), ...)
## S3 method for class 'test_mediation'
plot(x, which = c("ci", "density", "ellipse", "weight"), ...)
object, x |
an object inheriting from class
|
which |
a character string specifying which plot to produce.
Possible values are |
... |
additional arguments to be passed down. |
The "fit_mediation" method calls ellipse_plot()
or weight_plot(), depending on the argument which.
The "test_mediation" method calls ci_plot(),
density_plot(), ellipse_plot(), or
weight_plot(), depending on the argument which.
An object of class "ggplot".
Andreas Alfons
Alfons, A., Ates, N.Y. and Groenen, P.J.F. (2022) Robust Mediation Analysis: The R Package robmed. Journal of Statistical Software, 103(13), 1–45. doi:10.18637/jss.v103.i13.
fit_mediation(), test_mediation()
ci_plot(), density_plot(),
ellipse_plot(), weight_plot()
data("BSG2014")
# run fast-and-robust bootstrap test
boot <- test_mediation(BSG2014,
x = "ValueDiversity",
y = "TeamCommitment",
m = "TaskConflict",
level = 0.9)
# create plots for robust bootstrap test
plot(boot, which = "ci")
plot(boot, which = "density")
plot(boot, which = "ellipse")
plot(boot, which = "weight")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.