Supplement the estimated coefficients with other useful information for informative visualization of the (robust) mediation analysis results. It is thereby possible to construct data frames for dot plots of selected coefficients, as well as density plots of the indirect effect.
# S3 method for bootTestMediation
fortify(model, data, method = c("dot", "density"),
parm = c("c", "ab"), ...)# S3 method for sobelTestMediation
fortify(model, data, method = c("dot",
"density"), parm = c("c", "ab"), level = 0.95, ...)
# S3 method for list
fortify(model, data, ...)
an object inheriting from class "testMediation"
containing results from (robust) mediation analysis.
for the "bootTestMediation"
method, this is currently
ignored. For the "sobelTestMediation"
method, this is an optional
numeric vector containing the \(x\)-values at which to evaluate the
assumed normal density from Sobel's test (only used in case of a density
plot). The default is to take 100 equally spaced points between the
estimated indirect effect \(\pm\) three times the standard error
according to Sobel's formula.
a character string specifying for which plot to construct the
data frame. Possible values are "dot"
for a dot plot of selected
coefficients, or "density"
for a density plot of the indirect effect.
a character string specifying the coefficients to be included in a dot plot. The default is to include the direct and the indirect effect.
numeric; the confidence level of the confidence intervals from Sobel's test to be included in a dot plot. The default is to include 95% confidence intervals.
additional arguments are currently ignored.
A data frame containing the necessary data for the selected plot, as well as additional information stored in attributes.