figure.joint.prob {iMediate}R Documentation

Contour Plot of Joint Probabilities related to Mediated Effect

Description

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'

Usage

figure.joint.prob(prob = "mediated.main", n = 100, sig.level = 0.05,
  grid.size = 0.01)

Arguments

prob

a character string specifying the probability to be plotted. One of "mediated.main" (default) and "mediated.direct". "mediated.main" requests the probability of the mediated effect and the main effect assuming there is no direct effect (c'=0). "mediated.direct" requests the probability of the mediated effect and 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

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.joint.prob()                                # Figure 4 of Wang (2018)
## figure.joint.prob(prob="mediated.direct")          # Figure 5 of Wang (2018)


[Package iMediate version 0.5.5 Index]