Description Usage Arguments Details Value Author(s) References Examples
View source: R/figure.joint.prob.R
Contour plot of joint probability of mediated effect and total effect in the absence of direct effect and joint probability of mediated effect and direct effect assuming ab=c'
1 2 | figure.joint.prob(prob = "mediated.main", n = 100, sig.level = 0.05,
grid.size = 0.01)
|
prob |
a character string specifying the probability 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 a^2 and b^2 |
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.
A plot generated using package plotly
Kai Wang <kai-wang@uiowa.edu>
Wang, K. (2018) Understanding power anomalies in mediation analysis. Psychometrika 83 (2), 387-406.
1 2 | ## figure.joint.prob() # Figure 4 of Wang (2018)
## figure.joint.prob(prob="mediated.direct") # Figure 5 of Wang (2018)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.