figure.relative.power: Contour Plot of Relative Power: Mediated Effect versus Total Effect,
Mediated Effect versus Direct Effect
Description
Contour plot of relative power of mediated effect versus total effect in the
absence of direct effect and relative power of mediated effect versus direct
effect when \(ab=c'\).
a character string specifying the relative power to be
plotted. One of "mediated2main" (default) and
"mediated2direct". "mediated2main" requests the log of power
ratio for the mediated effect versus the main effect assuming there is no
direct effect (\(c'=0\)). "mediated2direct" requests the log of
power ratio for the mediated effect versus the direct effect assuming
\(ab=c'\)
n
sample size
sig.level
significance level used for the test of the mediated effect
grid.size
grid size for \(a^2\) and \(b^2\)
Value
A plot generated using package plotly
Details
Basic three-factor mediation model is assumed. Coefficients are standardized such
that the variances of treatment, mediator, and outcome are equal to 1. Note
that the y-axis is \(a^2\) and the x-axis is \(b^2\). The default axes
labels from R function plot_ly are switched in order to make them
correct.
References
Wang, K. (2018) Understanding power anomalies in mediation
analysis. Psychometrika 83 (2), 387-406.