Mediation & Moderated Mediation Visualizer
Visualize how effects propagate through mediation and moderated mediation models. Enter your calibrated coefficients from prior analysis and explore direct, indirect, and total effects interactively.
OVERVIEW
Mediation analysis examines how an effect occurs by testing whether variable M (mediator) transmits the effect of X on Y. Moderated mediation adds complexity by allowing these pathways to vary across levels of a moderator W.
💡 This is a visualization tool, not an estimator. Enter coefficients and standard errors from your statistical software (SPSS PROCESS, Stata, R mediation, etc.) to explore the structural relationships visually.
📖 What this tool does
- Accepts calibrated path coefficients and SEs from your analysis
- Dynamically propagates structural equations as you adjust X and W
- Visualizes direct, indirect, and total effect decomposition
- Approximates uncertainty using delta-method formulas
- Generates conditional effect plots for moderated mediation
📘 Supported Model Types
Model A: Single Mediator
$$M = aX$$
$$Y = c'X + bM$$
Optional moderation at a-path, b-path, or direct path (c′)
Model B: Parallel Mediators
$$M_1 = a_1 X, \quad M_2 = a_2 X$$
$$Y = c'X + b_1 M_1 + b_2 M_2$$
Two independent mediators (no moderation in v1.0)
MARKETING SCENARIOS
Load calibrated parameters from realistic marketing research contexts. Each scenario includes coefficients and uncertainty estimates.
INPUTS & SETTINGS
Model Configuration
When enabled, path coefficients become conditional on moderator W.
📥 Import from PROCESS / Mplus / lavaan output
Paste output from your statistical software to auto-populate coefficients.
Download JSON template:
Path Coefficients
Enter the unstandardized coefficients and standard errors from your analysis output.
a-path (X → M)
a(W) = a₁ = 0.50
b-path (M → Y)
b(W) = b₁ = 0.60
c′-path (X → Y, direct)
c′(W) = c′₁ = 0.30
INTERACTIVE CONTROLS
VISUALIZATIONS
X → M Relationship
Slope = a(W). Vertical error bar = SE(M̂) = |X| × SE(a). ℹ️ See formulas
Predicted M̂ → Y Relationship
Slope = b(W). Horizontal error = SE(M̂). Vertical = propagated SE via delta method. ℹ️ See formulas
Structural Diagram
Arrows show path coefficients. Blue = direct, Orange = indirect pathway.
X → Y Effect Decomposition
Blue = Direct, Orange = Indirect, Black = Total. Error bars = SE × |X|. ℹ️ Formulas
Effect Decomposition Summary
Error bars show 95% confidence intervals. Effects computed at current X and W values.
Effect Decomposition at Current Values
INTERPRETATION
Adjust the coefficients and sliders above to see an interpretation here.
TECHNICAL DOCUMENTATION
📐 Model Equations
Single Mediator Model
$$M = a(W) \cdot X$$ $$Y = c'(W) \cdot X + b(W) \cdot M$$
Conditional Path Coefficients (when moderated)
$$a(W) = a_1 + a_3 W$$ $$b(W) = b_1 + b_3 W$$ $$c'(W) = c'_1 + c'_3 W$$
Parallel Mediator Model
$$M_1 = a_1 X, \quad M_2 = a_2 X$$ $$Y = c'X + b_1 M_1 + b_2 M_2$$
📊 Effect Definitions
| Effect | Formula | Interpretation |
|---|---|---|
| Direct Effect | $c'(W)$ | Effect of X on Y not through M |
| Indirect Effect | $a(W) \times b(W)$ | Effect of X on Y transmitted through M |
| Total Effect | $c'(W) + a(W) \times b(W)$ | Combined direct + indirect effects |
For parallel mediators, total indirect effect = $a_1 b_1 + a_2 b_2$
📈 Uncertainty Approximation
Converting CI to SE
$$SE = \frac{\text{Upper} - \text{Lower}}{2 \times 1.96}$$
Variance of Conditional Path Coefficients
$$\text{Var}(a(W)) = \text{Var}(a_1) + W^2 \cdot \text{Var}(a_3)$$
Similarly for b(W) and c′(W). Independence of coefficients is assumed.
Indirect Effect Variance (Delta Method)
$$SE_{IE(W)} \approx \sqrt{b(W)^2 \cdot \text{Var}(a(W)) + a(W)^2 \cdot \text{Var}(b(W))}$$
Total Effect Variance
$$SE_{TE(W)} \approx \sqrt{\text{Var}(c'(W)) + \text{Var}(IE(W))}$$
Propagated Uncertainty in Visualizations
The charts show error bars that propagate uncertainty through the mediation path:
X → M Plot (vertical error): Uncertainty in predicted mediator
$$SE(\hat{M}) = |X| \cdot SE(a)$$
M̂ → Y Plot: Uncertainty propagates through both the a-path and b-path
- Horizontal error: $SE(\hat{M}) = |X| \cdot SE(a)$
- Vertical error (delta method): $$SE(\hat{Y}_{via \hat{M}}) = \sqrt{(b \cdot SE(\hat{M}))^2 + (\hat{M} \cdot SE(b))^2}$$
This combines: (1) uncertainty in where M̂ lands, and (2) uncertainty in the b slope.
X → Y Decomposition (vertical errors): Effect uncertainty scaled by X
$$SE(\hat{Y}_{direct}) = |X| \cdot SE(c')$$ $$SE(\hat{Y}_{indirect}) = |X| \cdot SE_{IE}$$ $$SE(\hat{Y}_{total}) = |X| \cdot SE_{TE}$$
⚠️ Important Limitation: These are approximate standard errors using the delta method with assumed independence. For formal inference, use bootstrap CIs from your estimation software.
🔧 Version & Boundaries
Version 1.0 Capabilities
- ✔ Single mediator model
- ✔ Optional moderation at any path
- ✔ Parallel mediation (two mediators)
- ✔ Approximate uncertainty via delta method
- ✔ Conditional effect plots
Not Included in v1.0
- ✘ Multiple moderators
- ✘ Serial mediation (chained mediators)
- ✘ Covariance-aware inference
- ✘ Bootstrap resampling engine