figure.relative.power {iMediate} | R Documentation |
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'
.
Usage
figure.relative.power(comparison = "mediated2main", n = 100,
sig.level = 0.05, grid.size = 0.01)
Arguments
comparison |
a character string specifying the relative power to be
plotted. One of |
n |
sample size |
sig.level |
significance level used for the test of the mediated effect |
grid.size |
grid size for |
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.
Value
A plot generated using package plotly
Author(s)
Kai Wang <kai-wang@uiowa.edu>
References
Wang, K. (2018) Understanding power anomalies in mediation analysis. Psychometrika 83 (2), 387-406.
Examples
## figure.relative.power() # Figure 2 of Wang (2018)
## figure.relative.power(comparison="mediated2direct") # Figure 3 of Wang (2018)