plot-methods {robmed} | R Documentation |
Plot (robust) mediation analysis results
Description
Visualize results from (robust) mediation analysis.
Usage
## 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"), ...)
Arguments
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. |
Details
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
.
Value
An object of class "ggplot"
.
Author(s)
Andreas Alfons
References
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.
See Also
fit_mediation()
, test_mediation()
ci_plot()
, density_plot()
,
ellipse_plot()
, weight_plot()
Examples
data("BSG2014")
# run fast-and-robust bootstrap test
boot <- test_mediation(BSG2014,
x = "ValueDiversity",
y = "TeamCommitment",
m = "TaskConflict")
# create plots for robust bootstrap test
plot(boot, which = "ci")
plot(boot, which = "density")
plot(boot, which = "ellipse")
plot(boot, which = "weight")