Mediation and Moderation Analysis: Zero to Hero Tutorial
This comprehensive tutorial takes you from the foundational concepts of Mediation and Moderation Analysis all the way through advanced conditional process models, estimation, evaluation, and practical usage within the DataStatPro application. Whether you are encountering these methods for the first time or looking to deepen your understanding of process analysis, this guide builds your knowledge systematically from the ground up.
Table of Contents
- Prerequisites and Background Concepts
- What is Mediation and Moderation Analysis?
- The Mathematics Behind Mediation and Moderation
- Assumptions of Mediation and Moderation Analysis
- Types of Mediation and Moderation Models
- Using the Mediation and Moderation Component
- Mediation Analysis
- Moderation Analysis
- Conditional Process Analysis
- Model Fit and Evaluation
- Advanced Topics
- Worked Examples
- Common Mistakes and How to Avoid Them
- Troubleshooting
- Quick Reference Cheat Sheet
1. Prerequisites and Background Concepts
Before diving into mediation and moderation analysis, it is essential to be comfortable with the following foundational statistical concepts. Each is briefly reviewed below.
1.1 Simple and Multiple Linear Regression
Simple linear regression models the relationship between one predictor and an outcome :
Where:
- is the intercept — the expected value of when .
- is the slope — the expected change in for a one-unit increase in .
- is the residual error — the part of not explained by .
Multiple linear regression extends this to include several predictors:
Each coefficient represents the partial effect of on , holding all other predictors constant. Mediation and moderation analyses are built entirely on systems of linear regression equations, so a solid understanding of regression is essential.
1.2 Standardised vs. Unstandardised Coefficients
Unstandardised coefficients () are expressed in the original units of and . They answer: "For a one-unit increase in , how many units does change?"
Standardised coefficients () are expressed in standard deviation units and are obtained by standardising all variables (mean = 0, SD = 1) before analysis:
In mediation analysis, the indirect effect is most meaningfully expressed in unstandardised units (so it represents a real-world quantity). Standardised coefficients facilitate comparison across studies with different measurement scales.
1.3 Causal Diagrams (Path Diagrams)
A path diagram is a graphical representation of a statistical model showing the hypothesised relationships between variables:
- Rectangles (or squares) represent observed variables.
- Ovals (or circles) represent latent variables (not used in basic mediation/moderation).
- Single-headed arrows () represent directional relationships (regression paths).
- Double-headed arrows () represent correlations (non-directional associations).
The path coefficient on each arrow is the regression coefficient ( or ) for that specific relationship.
1.4 The Product of Coefficients
The indirect effect in mediation analysis is computed as the product of two regression coefficients: the effect of on (the mediator), and the effect of on (the outcome, controlling for ):
This product of coefficients is the foundation of modern mediation analysis. Understanding that an indirect path through a mediator equals the product of the coefficients on that path is the single most important concept in mediation analysis.
1.5 Interaction Terms
An interaction between two variables and is represented by their product:
When this product term is included in a regression model, it captures how the effect of on depends on the level of . This is the mathematical basis of moderation analysis. The interaction term is NOT the same as the sum or average of and — it is specifically their product.
1.6 The Concept of Conditional Effects
A conditional effect is the effect of one variable on another at a specific value of a third variable. For example:
This reads: "The effect of on when equals ." Understanding conditional effects is the key to interpreting moderation results.
1.7 Bootstrapping
Bootstrapping is a resampling method used to construct confidence intervals for statistics whose sampling distributions are unknown or non-normal (such as the product of two regression coefficients ). The algorithm is:
- Draw bootstrap samples of size from the original data with replacement.
- Compute the statistic of interest (e.g., indirect effect ) in each bootstrap sample.
- The distribution of the bootstrap estimates approximates the sampling distribution.
- The 95% CI is the 2.5th and 97.5th percentiles of this bootstrap distribution.
Bootstrapping is the gold standard for testing indirect effects in mediation analysis. Typically to bootstrap samples are used.
2. What is Mediation and Moderation Analysis?
2.1 The Core Questions
Mediation and moderation analysis addresses two complementary questions about how and when relationships between variables exist:
Mediation asks HOW or WHY does affect ?
"Does the effect of stress () on depression () operate through rumination ()?"
Moderation asks WHEN or FOR WHOM does affect ?
"Is the effect of stress () on depression () stronger for people with low social support () compared to people with high social support ()?"
Conditional Process Analysis asks HOW AND WHEN simultaneously:
"Does the indirect effect of stress on depression through rumination depend on the level of social support?"
2.2 The Fundamental Distinction
| Concept | Question | Mechanism | Variable Type |
|---|---|---|---|
| Mediation | How/Why? | is a mediator (intermediate variable) | |
| Moderation | When/For whom? | changes the relationship | is a moderator (context variable) |
| Conditional Process | How AND When? | Indirect effect depends on | Both (mediator) and (moderator) present |
2.3 Visual Summary of Core Concepts
Mediation (M is on the path from X to Y): X ─────────→ Y ↘ ↗ M (Mediator)
Moderation (W changes the strength/direction of X → Y): W (Moderator) ↓ X ─────────→ Y (effect of X depends on W) Moderated Mediation (Conditional Process): W (Moderator) ↓ X ─────────→ Y ↘ ↗ M (Mediator)
2.4 Real-World Applications
| Field | Mediation Example | Moderation Example |
|---|---|---|
| Psychology | Exercise → Self-efficacy → Wellbeing | Exercise → Wellbeing (stronger for introverts) |
| Medicine | Drug → Inflammation reduction → Pain relief | Drug → Pain relief (varies by genetic marker) |
| Education | Training → Self-regulation → Academic performance | Training → Performance (varies by prior knowledge) |
| Marketing | Ad exposure → Brand attitude → Purchase intent | Ad exposure → Purchase (stronger for low involvement) |
| Management | Leadership style → Motivation → Productivity | Leadership → Productivity (varies by culture) |
| Public Health | Policy → Behaviour change → Health outcome | Policy → Health (varies by socioeconomic status) |
| Neuroscience | Stress → Cortisol → Memory impairment | Stress → Memory (moderated by amygdala volume) |
| Social Science | Poverty → Social isolation → Crime | Poverty → Crime (moderated by community cohesion) |
2.5 A Brief History
The Baron and Kenny (1986) causal steps approach was the dominant method for mediation analysis for two decades. It required four conditions to be satisfied for mediation to be claimed. However, it has been largely superseded by the product of coefficients approach combined with bootstrapped confidence intervals, advocated by Preacher & Hayes (2004, 2008) and formalised in Hayes' (2013, 2022) PROCESS macro framework — which is the approach implemented in DataStatPro.
3. The Mathematics Behind Mediation and Moderation
3.1 The Simple Mediation Model — Equations
The simplest mediation model involves three variables: a predictor , a mediator , and an outcome . It requires two regression equations:
Equation 1 — Predicting the mediator from :
Equation 2 — Predicting the outcome from both and :
Where:
- = effect of on (the a-path).
- = effect of on , controlling for (the b-path).
- = effect of on , controlling for (the direct effect of ).
- , = intercepts.
- , = residual errors.
3.2 The Three Effects in Mediation
The Total Effect ():
The total effect is the effect of on without including :
combines the direct and indirect pathways.
The Indirect Effect ():
The indirect effect is the product of the -path and the -path:
It quantifies how much of the effect of on is transmitted through .
The Direct Effect ():
The direct effect is the effect of on after accounting for :
The Fundamental Identity:
The total effect equals the direct effect plus the indirect effect:
This decomposition is the cornerstone of mediation analysis. Every unit of the total effect can be attributed to either the direct path () or the indirect path through the mediator ().
3.3 The Proportion Mediated
The proportion mediated (also called the indirect effect ratio) estimates what fraction of the total effect passes through the mediator:
⚠️ The proportion mediated is unreliable when the total effect is near zero (even if the indirect effect is substantial — a phenomenon called inconsistent mediation). Never rely on the proportion mediated as the primary evidence for mediation.
3.4 Multiple Mediators — Parallel Mediation
With parallel mediators , the model uses equations:
Equations for each mediator :
Outcome equation:
Specific indirect effect through mediator :
Total indirect effect:
Total effect:
Contrasts between indirect effects: The difference between two specific indirect effects can be tested:
A bootstrapped CI for this contrast that excludes zero indicates that mediators and transmit significantly different portions of the effect of to .
3.5 Sequential (Serial) Mediation
With two sequential mediators and (where precedes on the causal chain):
Equation 1:
Equation 2:
Equation 3:
Where is the effect of on .
The three indirect effects:
| Path | Indirect Effect | Interpretation |
|---|---|---|
| Through only | ||
| Through only | ||
| Through both mediators sequentially |
Total indirect effect:
Total effect identity:
3.6 The Simple Moderation (Interaction) Model
The simple moderation model includes the predictor , the moderator , and their product:
Where:
- = effect of on when (the conditional direct effect of at ).
- = effect of on when .
- = the interaction effect — how much the effect of on changes for each one-unit increase in .
- = the intercept when both and .
The conditional effect of on at a specific value of :
This is the simple slope of on at the value . The moderation hypothesis is tested by examining whether .
3.7 Centering in Moderation Analysis
Mean-centering the predictor and moderator before computing the interaction term is strongly recommended:
The model becomes:
Benefits of mean-centering:
- Reduces multicollinearity between , , and (without changing the interaction coefficient ).
- Makes the intercept interpretable as the predicted value of when and are at their means.
- Makes interpretable as the effect of on at the mean of (not at , which may be outside the observed range).
⚠️ Centering does NOT change (the interaction coefficient) or the model's . It only changes the interpretation of and and reduces multicollinearity.
3.8 Probing the Interaction: Simple Slopes
After establishing a significant interaction (), the interaction must be probed to understand its nature. The simple slopes method computes the conditional effect of on at representative values of :
Standard values of (Pick-a-point approach):
- Low: (one SD below the mean).
- Medium: (the mean).
- High: (one SD above the mean).
Simple slope at each value :
Standard error of the simple slope:
t-statistic for the simple slope:
With where is the number of predictors.
Johnson-Neyman (Floodlight) Method: Rather than evaluating at specific values of , the Johnson-Neyman technique finds the exact value(s) of at which the simple slope transitions from significant to non-significant (the region of significance):
The region of significance is the range of values where the simple slope of on is statistically significant ().
3.9 The Conditional Process Model — Moderated Mediation
The moderated mediation model combines mediation and moderation. The indirect effect becomes a function of the moderator :
General form (moderator on the -path):
The conditional indirect effect at value of :
This is a linear function of . The index of moderated mediation (Hayes, 2015) is :
- If the CI for excludes zero, the indirect effect is significantly moderated.
General form (moderator on the -path):
The conditional indirect effect at value of :
Index of moderated mediation:
4. Assumptions of Mediation and Moderation Analysis
4.1 Causal Ordering (Temporal Precedence)
The most fundamental assumption of mediation analysis is that the hypothesised causal ordering is correct: must precede in time, and must precede in time.
Why it matters: Mediation analysis estimates causal indirect effects. If the temporal order is wrong (e.g., actually precedes ), the computed product does not represent a causal indirect effect — it is merely a partial correlation.
How to check:
- Use longitudinal data where , , and are measured at different time points.
- In experimental designs, randomise to ensure it causally precedes .
- In cross-sectional data, rely on theory and prior literature to justify the causal order.
⚠️ Cross-sectional data alone cannot establish causal mediation. Mediation from cross-sectional data should always be described as "consistent with a mediation hypothesis" rather than "demonstrating causal mediation."
4.2 No Unmeasured Confounding
Both the relationship and the relationship must be free of unmeasured confounders — variables that affect both the predictor/mediator and the outcome simultaneously.
Why it matters: If an unmeasured variable affects both and , the -path estimate (effect of on ) is biased, and the indirect effect does not represent a causal effect.
How to address:
- Measure and control for known confounders.
- Use experimental manipulation of when possible.
- Conduct sensitivity analysis (e.g., Imai et al.'s sensitivity parameter ) to assess how large an unmeasured confounder would need to be to nullify the indirect effect.
4.3 Linearity
The model assumes that all relationships (paths) are linear. Non-linear relationships (e.g., curvilinear effects, threshold effects) are not captured by standard mediation and moderation models.
How to check:
- Plot residuals against fitted values (should show no pattern).
- Add polynomial terms (e.g., ) to the model and test their significance.
- Use partial regression plots (added variable plots) for each predictor.
4.4 Normally Distributed Residuals
The residuals and should be approximately normally distributed. This is required for the validity of t-tests and F-tests of regression coefficients.
How to check:
- Q-Q plots of residuals.
- Shapiro-Wilk test of residuals.
- Histograms of residuals.
Remedy when violated: Use bootstrapped confidence intervals for indirect effects — bootstrapping does not require normality of the indirect effect and is robust to non-normal residuals.
4.5 Homoscedasticity
The variance of the residuals should be constant across all levels of the predictors (homoscedasticity). Heteroscedasticity (non-constant variance) inflates or deflates standard errors, affecting the validity of significance tests.
How to check:
- Breusch-Pagan test.
- White test.
- Plot residuals vs. fitted values: look for a fan shape.
Remedy when violated: Use heteroscedasticity-consistent (HC) standard errors (White's robust SEs). DataStatPro implements HC3 robust standard errors as an option.
4.6 Independence of Observations
Each observation must be independent of all others. Violations occur with clustered data (e.g., students within schools), repeated measures (same subject at multiple times), or dyadic data (e.g., couples).
How to address:
- Clustered data: Use multilevel mediation/moderation models.
- Longitudinal/repeated measures: Use cross-lagged panel models or cross-lagged mediation.
- Dyadic data: Use Actor-Partner Interdependence Model (APIM) with mediation extensions.
4.7 No Perfect Multicollinearity
Predictors should not be perfectly correlated with each other. In moderation analysis, the interaction term is often highly correlated with and individually (multicollinearity), which can inflate standard errors and destabilise coefficient estimates.
How to check:
- Variance Inflation Factor (VIF): is typically a concern.
- Condition index from eigenvalue decomposition.
Remedy: Mean-center and before forming the interaction term (as described in Section 3.7). This substantially reduces multicollinearity without changing .
4.8 Adequate Sample Size and Statistical Power
Mediation analysis (especially bootstrapped indirect effects) requires sufficient sample size for stable and reproducible results:
| Model Type | Minimum | Recommended |
|---|---|---|
| Simple mediation | 100 | |
| Parallel mediation (2 mediators) | 150 | |
| Sequential mediation | 200 | |
| Simple moderation | 100 | |
| Moderated mediation | 200 | |
| Complex conditional process | 300 |
💡 Use Monte Carlo power analysis (e.g., via the
pwrssorpwr2pplpackages in R, or the DataStatPro power module) to determine the required sample size for your specific model and effect size prior to data collection.
5. Types of Mediation and Moderation Models
5.1 Mediation Models
| Model | Structure | Key Feature |
|---|---|---|
| Simple Mediation | One mediator; single indirect path | |
| Parallel Multiple Mediation | Multiple mediators operating simultaneously; not causally connected | |
| Sequential (Serial) Mediation | Mediators are causally chained; affects | |
| Multiple Sequential Mediation | Three or more sequential mediators | |
| Partial Mediation | AND | Both direct and indirect effects are non-zero |
| Full Mediation | (direct = 0) | All of 's effect on operates through |
| Inconsistent Mediation | but (or vice versa) | Direct and indirect effects have opposite signs |
5.2 Moderation Models
| Model | Structure | Key Feature |
|---|---|---|
| Simple Moderation | moderates | One moderator; one interaction term |
| Multiple Moderation | and both moderate | Two moderators tested simultaneously |
| Three-Way (Moderated Moderation) | moderates the interaction | The interaction itself is moderated |
| Moderated Regression with Covariates | Moderation with control variables | Interaction tested after controlling for confounders |
5.3 Conditional Process Models (Moderated Mediation / Mediated Moderation)
| Model | Where Moderation Occurs | Hayes PROCESS Model |
|---|---|---|
| Moderated Mediation (First-Stage) | moderates the -path () | Model 7 |
| Moderated Mediation (Second-Stage) | moderates the -path () | Model 14 |
| Moderated Mediation (Both Stages) | moderates both and paths | Model 58 |
| Moderated Mediation (Direct Path) | moderates the direct effect | Model 5 |
| Mediated Moderation | mediates the interaction | Model 8 |
| Sequential Moderated Mediation | moderates a path in a sequential mediation model | Models 83, 84, 85 |
| Dual Moderated Mediation | Two separate moderators on two different paths | Model 21 |
5.4 Key Terminology Clarification
| Term | Definition | Notes |
|---|---|---|
| Indirect Effect | (product of path coefficients through ) | The core quantity in mediation |
| Direct Effect | (effect of on after accounting for ) | Residual effect not through |
| Total Effect | Sum of direct and all indirect effects | |
| Conditional Direct Effect | Direct effect that varies with | |
| Conditional Indirect Effect | or | Indirect effect that varies with |
| Index of Moderated Mediation | Coefficient linking to the indirect effect | or |
| Region of Significance | Range of where simple slope is | From Johnson-Neyman method |
| Floodlight Analysis | Johnson-Neyman visualisation across all values of | Shows full region of significance |
6. Using the Mediation and Moderation Component
The Mediation and Moderation component in DataStatPro provides a complete workflow for specifying, estimating, evaluating, and visualising all mediation, moderation, and conditional process models.
Step-by-Step Guide
Step 1 — Select Dataset
Choose the dataset from the "Dataset" dropdown. Ensure:
- All variables (predictor, mediator(s), moderator(s), outcome, covariates) are in separate columns.
- All variables are numeric (continuous or binary coded 0/1).
- The dataset has been screened for missing data and outliers.
💡 Tip: Run descriptive statistics (means, SDs, skewness) before mediation/moderation analysis. Extreme skewness () may affect the normality of residuals and make bootstrapped CIs preferable.
Step 2 — Select Analysis Type
Choose from the "Analysis Type" dropdown:
- Mediation Analysis — for pure mediation models (simple, parallel, sequential).
- Moderation Analysis — for pure moderation models (simple, multiple, three-way).
- Conditional Process Analysis — for combined moderated mediation / mediated moderation models.
Step 3 — Specify the Model Structure
- Predictor (X): Select the independent variable.
- Outcome (Y): Select the dependent variable.
- Mediator(s) (M): Select one or more mediator variables (for mediation models).
Specify the type of mediation:
- Parallel (mediators are not causally connected).
- Sequential (specify the causal order of mediators).
- Moderator(s) (W, V): Select one or more moderator variables (for moderation and conditional process models).
- Covariates (C): Select any control variables to include in all equations.
⚠️ Important: Specify the model structure based on your theory, NOT based on what produces the best statistics. Choosing the model after seeing the data is a form of HARKing (Hypothesising After Results are Known) and invalidates statistical inference.
Step 4 — Select the Conditional Process Model Type
If running a Conditional Process Analysis, select the specific model from the dropdown:
- First-Stage Moderated Mediation — moderates the path.
- Second-Stage Moderated Mediation — moderates the path.
- Both-Stages Moderated Mediation — moderates both and paths.
- Mediated Moderation — mediates the effect.
- Sequential Moderated Mediation — sequential mediators with moderation.
Step 5 — Select Probing Options (for Moderation)
Specify how to probe significant interactions:
- Spotlight Analysis (Pick-a-Point): Compute simple slopes at Low (), Mean, and High () values of .
- Johnson-Neyman (Floodlight) Analysis: Compute the exact region(s) of significance across all values of .
- Custom values of : Enter specific percentiles or theoretically meaningful values.
💡 Tip: Always request both spotlight and Johnson-Neyman analyses. The pick-a-point approach is useful for visualisation; Johnson-Neyman gives a complete picture of where the interaction is and is not significant.
Step 6 — Configure Bootstrap Settings
- Number of Bootstrap Samples (): Default = 5,000. Increase to 10,000 for publication.
- Confidence Level: Default = 95% (BCa bootstrapped CIs). Change to 90% or 99% as needed.
- Bootstrap Method:
- Percentile CI: Simple and widely used.
- Bias-Corrected and Accelerated (BCa) CI: Corrects for bias and skewness in the bootstrap distribution. Recommended for indirect effects.
💡 Recommendation: Use BCa bootstrapped CIs with for indirect effects in published work. This is the gold standard for mediation analysis.
Step 7 — Mean-Centering Options
For models involving interaction terms (moderation or conditional process):
- Mean-center all continuous predictors and moderators: Recommended — reduces multicollinearity.
- Standardise all variables: Alternative — produces fully standardised coefficients.
- No centering: Use only when and are meaningful reference points.
Step 8 — Display Options
Select which outputs and visualisations to display:
- ✅ Path diagram with estimated coefficients.
- ✅ Regression equation summaries for each equation in the model.
- ✅ Direct, indirect, and total effects table.
- ✅ Bootstrapped confidence intervals for indirect effects.
- ✅ Simple slopes table and plot (for moderation).
- ✅ Johnson-Neyman plot with region of significance.
- ✅ Interaction plot (Y vs. X at Low/Mean/High values of W).
- ✅ Conditional indirect effects table (for conditional process models).
- ✅ Index of moderated mediation with bootstrapped CI.
Step 9 — Run the Analysis
Click "Run Analysis". The application will:
- Estimate all regression equations using OLS.
- Compute direct, indirect, and total effects.
- Generate bootstrap samples and compute the bootstrap distribution of indirect effects.
- Construct BCa bootstrapped confidence intervals for all indirect effects.
- Compute simple slopes at all specified values of .
- Compute the Johnson-Neyman region of significance.
- Generate all selected visualisations and output tables.
7. Mediation Analysis
7.1 Simple Mediation
Simple mediation tests whether the effect of on is transmitted through a single mediator . This is the foundational mediation model.
7.1.1 Model Specification
The model requires two regression equations:
Path a equation:
Path b and c' equation:
Total effect equation (for reference):
The path diagram is: a b X ─────────────→ M ─────────────→ Y ↘ ↗ ──────────── c' ───────────
7.1.2 The Four Conditions (Baron & Kenny, Historical)
For historical context, the Baron-Kenny causal steps approach required:
- significantly predicts (total effect significant).
- significantly predicts (a-path significant).
- significantly predicts controlling for (b-path significant).
- The effect of on is reduced when is included ().
⚠️ The Baron-Kenny approach is now considered outdated and is NOT recommended. Condition 1 is not required (mediation can exist without a significant total effect — called "inconsistent mediation"). Use bootstrapped indirect effects instead.
7.1.3 Modern Approach: Bootstrapped Indirect Effects
The modern approach tests mediation by constructing a bootstrapped confidence interval for the indirect effect :
- Estimate and from the data.
- Compute (point estimate of indirect effect).
- Generate bootstrap samples.
- Compute in each bootstrap sample .
- Construct the 95% BCa CI from the bootstrap distribution.
- Decision: If the 95% CI for excludes zero → significant mediation.
7.1.4 Types of Mediation Based on Effect Sizes
| Pattern | Classification | |||
|---|---|---|---|---|
| No mediation | sig | not sig | sig | Direct effect only |
| Full mediation | sig | sig | not sig | All effect through |
| Partial mediation | sig | sig | sig (same sign) | Both direct and indirect |
| Inconsistent mediation | small/not sig | sig | sig (opposite sign) | Suppression; |
| Competitive mediation | sig | sig | sig (opposite sign) | Direct and indirect cancel |
7.1.5 Worked Calculation — Simple Mediation
Suppose , and we test whether self-efficacy () mediates the effect of exercise (, hours/week) on wellbeing (, 0–100 scale).
Path a equation (predicting self-efficacy from exercise):
→ , ,
Path b and c' equation (predicting wellbeing from exercise and self-efficacy):
→ ,
Total effect (predicting wellbeing from exercise only):
→
Indirect effect:
Verification: ✅
Bootstrap 95% BCa CI for indirect effect:
Conclusion: The indirect effect of exercise on wellbeing through self-efficacy is (95% BCa CI [0.132, 0.403]). Since the CI excludes zero, self-efficacy significantly mediates the exercise-wellbeing relationship. This is partial mediation — the direct effect () remains significant. Each additional hour of exercise per week is associated with a 0.255-point increase in wellbeing through increased self-efficacy.
7.2 Parallel Multiple Mediation
Parallel multiple mediation tests whether affects through two or more simultaneous mediators that are not causally connected to each other.
7.2.1 Model Specification (Two Mediators)
Path equations:
Path diagram:
a₁ b₁
────────→ M₁ ────────↘
X ──────↗ Y ────────→ M₂ ────────↗ a₂ b₂ ↘────────────↗ c'
7.2.2 Effects Decomposition
| Effect | Formula | Description |
|---|---|---|
| Specific indirect via | Effect through mediator 1 | |
| Specific indirect via | Effect through mediator 2 | |
| Total indirect | Combined indirect effect | |
| Direct effect | Effect not through any mediator | |
| Total effect | All pathways combined | |
| Contrast ( vs ) | Difference between indirect effects |
7.2.3 Testing Contrasts Between Indirect Effects
A key advantage of parallel mediation over separate simple mediations is the ability to directly compare specific indirect effects. The contrast tests whether mediator transmits significantly MORE or LESS of the effect than :
A bootstrapped 95% CI for that excludes zero indicates that the two indirect effects differ significantly. This allows statements such as: "The indirect effect through self-efficacy was significantly larger than the indirect effect through motivation (, 95% BCa CI [0.04, 0.35])."
7.2.4 Why Parallel Mediation is Preferred Over Separate Analyses
| Reason | Explanation |
|---|---|
| Controls for mediators simultaneously | Each coefficient controls for the other mediators |
| Avoids inflated Type I error | One model rather than multiple separate tests |
| Enables direct comparison | Contrasts between specific indirect effects are possible |
| More powerful | Estimates are more precise when mediators share variance |
⚠️ Never run separate simple mediation analyses for each mediator and compare results informally. Always include all mediators simultaneously in a single model to correctly estimate specific indirect effects.
7.3 Sequential (Serial) Mediation
Sequential mediation (also called serial mediation) tests a causal chain hypothesis where affects , which then affects , which then affects . This model makes stronger theoretical claims than parallel mediation.
7.3.1 Model Specification (Two Sequential Mediators)
Equation 1:
Equation 2:
Equation 3:
Path diagram: a₁ d₂₁ b₂ X ────────→ M₁ ───────→ M₂ ───────→ Y ↘─────────↗ ↘──── a₂ ───────→ M₂ ↘──── a₁b₁ ───────→ Y c'
7.3.2 The Three Indirect Effects
| Path | Formula | Description |
|---|---|---|
| Through only, bypassing | ||
| Through only, bypassing | ||
| The full serial pathway | ||
| Total indirect | All indirect pathways |
7.3.3 When to Use Sequential vs. Parallel Mediation
| Feature | Sequential | Parallel |
|---|---|---|
| Mediators causally connected ()? | Yes | No |
| Theoretical justification for chain? | Required | Not required |
| Tests the full causal process? | Yes | Partially |
| More complex model? | Yes | Simpler |
| Requires larger sample? | Yes | Less so |
💡 Use sequential mediation ONLY when there is strong theoretical (and ideally temporal) justification for a causal chain between mediators. If the causal connection between and is ambiguous, use parallel mediation and add the path as a sensitivity check.
7.3.4 Extending to Three or More Sequential Mediators
With three sequential mediators , the model contains five equations and seven indirect effects (one for each possible sub-path combination), including the full chain .
For sequential mediators, the number of indirect effects is .
⚠️ Models with more than two sequential mediators require very large samples () and should have very strong theoretical justification. The risk of overfitting and non-replication increases substantially with model complexity.
8. Moderation Analysis
8.1 Simple Moderation
Simple moderation tests whether the relationship between and depends on the level of a third variable (the moderator).
8.1.1 Model Specification
The hypothesis of moderation is tested by .
A significant indicates that the effect of on varies as a function of .
8.1.2 Interpreting the Interaction Coefficient
The interaction coefficient tells us:
"For each one-unit increase in , the effect of on changes by units."
Or equivalently:
"The conditional effect of on is ."
The sign and magnitude of determine the pattern of moderation:
| Pattern | Visualisation | |
|---|---|---|
| Positive, large | Strong positive moderation | Steeper slope at high |
| Positive, small | Weak positive moderation | Slightly steeper slope at high |
| Zero | No moderation | Parallel lines across values |
| Negative, small | Weak negative moderation | Slightly flatter slope at high |
| Negative, large | Strong negative moderation | Reversed/attenuated slope at high |
8.1.3 Simple Slopes Analysis (Spotlight Analysis)
After finding a significant interaction, compute simple slopes at three values of :
Low :
Mean :
High :
For each simple slope, compute:
- The unstandardised coefficient (the simple slope value).
- The standard error.
- The t-statistic and p-value.
- The 95% confidence interval.
8.1.4 Visualising Moderation
The interaction should always be visualised with an interaction plot (also called a moderation plot or floodlight plot):
- X-axis: The predictor (typically at two values: ).
- Y-axis: The predicted outcome .
- Lines: One line for each level of (Low, Mean, High).
Non-parallel lines indicate moderation. Crossing lines indicate that the direction of the relationship reverses across values of .
8.1.5 Moderator Variable Types
| Moderator Type | Example | Analytical Note |
|---|---|---|
| Continuous | Age, income, personality score | Mean-centre before creating interaction |
| Binary (0/1) | Gender, treatment condition | No centering needed; compare two slopes |
| Multicategorical | Ethnicity (3+ groups) | Use dummy coding; one interaction per dummy |
For binary moderators: The interaction test compares the simple slope of on in Group 0 vs. Group 1. The simple slope in Group 0 is (since ); in Group 1 it is (since ).
8.2 Multiple Moderation
Multiple moderation tests whether two (or more) moderators and independently moderate the relationship in the same model.
8.2.1 Model Specification
Where:
- = interaction between and (adjusting for and ).
- = interaction between and (adjusting for and ).
The conditional effect of on given specific values of and :
8.2.2 Interpreting Multiple Moderation Results
Each interaction coefficient ( and ) is interpreted conditional on the other moderator being held at zero (or at its mean, if centred):
- : How the effect of on changes per unit of , at (or ).
- : How the effect of on changes per unit of , at (or ).
Simple slopes are probed at all combinations of and levels (e.g., combinations for Low/Mean/High values of both moderators).
💡 Multiple moderation models require substantially larger samples than simple moderation ( recommended) because two interaction terms consume more degrees of freedom and interactions are typically harder to detect statistically.
8.3 Moderated Moderation (Three-Way Interaction)
Moderated moderation (also called a three-way interaction) tests whether the moderation effect of on the relationship is itself moderated by a third variable . In other words: does the strength of the interaction between and depend on ?
8.3.1 Model Specification
Where:
- is the three-way interaction coefficient — the test of moderated moderation.
The conditional interaction effect (how the interaction varies with ):
The conditional simple slope of on at specific values of and :
8.3.2 Probing Three-Way Interactions
To probe a significant three-way interaction ():
Step 1: Pick values of (e.g., , , ).
Step 2: At each value of , compute the two-way interaction between and :
Step 3: At each combination of and values, compute the simple slope of :
This produces simple slopes (at Low/Mean/High of both and ), organised into three two-way interaction plots, one for each level of .
8.3.3 Visualising Three-Way Interactions
A three-way interaction requires three two-way interaction plots arranged side by side:
- Left panel: at , with lines for , , .
- Centre panel: at , with lines for , , .
- Right panel: at , with lines for , , .
The three-way interaction is significant when the pattern of the two-way interaction visibly changes across the three panels (e.g., the interaction lines are more or less divergent, or the direction of moderation reverses).
⚠️ Three-way interactions require very large samples ( minimum, ideally ) to achieve adequate statistical power. They are also notoriously difficult to replicate. Always interpret with caution and seek replication.
9. Conditional Process Analysis
Conditional process analysis (Hayes, 2013) refers to models that simultaneously incorporate mediation and moderation — the goal is to understand both how (mediation) and when/for whom (moderation) affects .
9.1 Moderated Mediation — First-Stage (W Moderates the a-Path)
In first-stage moderated mediation, the moderator changes the strength of the relationship (the a-path). Different levels of produce different magnitudes of the effect of on , which in turn produces different indirect effects.
9.1.1 Model Equations
Equation 1 (a-path moderated by W):
Equation 2 (b-path unmoderated):
9.1.2 The Conditional Indirect Effect
The indirect effect varies with because the a-path is moderated:
At specific values of :
9.1.3 Index of Moderated Mediation
The index of moderated mediation (IMM) is the rate at which the indirect effect changes as increases by one unit:
- If the bootstrapped 95% CI for IMM excludes zero → the indirect effect is significantly moderated by .
- The sign of IMM indicates the direction: positive IMM means the indirect effect increases with ; negative means it decreases.
9.1.4 Path Diagram
W
↓ (moderates a-path)
X ─────────────→ M ─────────→ Y a₁ + a₃W b ↘────────────────────────↗ c'
9.2 Moderated Mediation — Second-Stage (W Moderates the b-Path)
In second-stage moderated mediation, the moderator changes the strength of the relationship (the b-path). The mechanism by which transmits the effect to depends on the level of .
9.2.1 Model Equations
Equation 1 (a-path unmoderated):
Equation 2 (b-path moderated by W):
9.2.2 The Conditional Indirect Effect
The indirect effect varies with because the b-path is moderated:
9.2.3 Index of Moderated Mediation
A bootstrapped 95% CI for that excludes zero indicates significant moderation of the indirect effect.
9.2.4 Path Diagram
W
↓ (moderates b-path)
X ──────────────→ M ────────────────────────→ Y a b₁ + b₃W ↘──────────────────────────────────────────↗ c'
9.3 Moderated Mediation — Both Stages (W Moderates Both a- and b-Paths)
The most complex single-moderator model has moderating both the a-path () and the b-path () simultaneously.
9.3.1 Model Equations
Equation 1 (a-path moderated by W):
Equation 2 (b-path also moderated by W):
9.3.2 The Conditional Indirect Effect
Both the a-path and the b-path are now functions of :
This is a quadratic function of — the indirect effect can change non-linearly across values of .
Expanding:
9.3.3 Index of Moderated Mediation
Because the indirect effect is quadratic in , there is no single IMM. Instead, the conditional indirect effect must be evaluated at multiple values of and tested with bootstrapped CIs at each value.
A useful summary is the joint significance of and — if both are significant, moderation at both stages is supported. However, always report the full conditional indirect effect table with bootstrapped CIs.
9.3.4 Path Diagram
W
↓ (moderates both a and b paths)
X ──────────────────→ M ──────────────────→ Y a₁ + a₃W b₁ + b₃W ↘─────────────────────────────────────────↗ c'
9.4 Mediated Moderation
Mediated moderation is conceptually the inverse of moderated mediation. Instead of asking "does the indirect effect depend on ?", it asks: "does the effect of the interaction on operate through a mediator ?"
9.4.1 Model Equations
Equation 1 (mediating the interaction):
Equation 2:
9.4.2 The Indirect Effect of Through
The indirect effect of the interaction on through is:
This answers: "How much of the interaction effect of and on is transmitted through the mediator ?"
9.4.3 Mediated Moderation vs. Moderated Mediation: An Important Distinction
| Feature | Moderated Mediation | Mediated Moderation |
|---|---|---|
| Primary question | Does the indirect effect () vary with ? | Does explain why affects ? |
| Focus | Conditional indirect effect of on | Mechanism of an interaction effect |
| Centrepiece | The indirect effect | The interaction () |
| Modern preference | More commonly used | Less commonly used |
| When to use | Theory specifies how connects and | Theory specifies why an interaction exists |
💡 Most modern researchers prefer to frame their models as moderated mediation rather than mediated moderation, because moderated mediation makes clearer and more direct theoretical statements about conditional processes. If your theory is about an interaction effect and why it exists, mediated moderation is appropriate.
9.4.4 Path Diagram
X × W ──── a₃ ────→ M ──── d ────→ Y
↓
(interaction term)
9.5 Sequential Moderated Mediation
Sequential moderated mediation combines sequential (serial) mediation with moderation — a moderator affects one or more paths within a two-mediator sequential model.
9.5.1 Model Equations (W Moderates the First a-Path)
Equation 1 (a₁-path moderated by W):
Equation 2 (d₂₁-path unmoderated):
Equation 3:
9.5.2 The Conditional Indirect Effects
With moderating the first a-path, the three indirect effects become:
| Path | Conditional IE | Varies with ? |
|---|---|---|
| Yes | ||
| No | ||
| Yes |
9.5.3 Index of Moderated Mediation
For the path through only:
For the sequential path:
Both indices can be tested with bootstrapped confidence intervals.
9.5.4 Variants of Sequential Moderated Mediation
| Variant | Moderated Path | Hayes Model |
|---|---|---|
| W moderates only | First a-path | Model 83 |
| W moderates only | d-path | Model 84 |
| W moderates only | Second b-path | Model 85 |
| W moderates and | First a and second b | Model 91 |
9.5.5 Path Diagram (W Moderates First A-Path)
W
↓ (moderates a₁-path)
X ───────────────→ M₁ ──────────→ M₂ ──────────→ Y a₁₁ + a₁₃W d₂₁ b₂ ↘────────────────────────────────────── b₁ c'
10. Model Fit and Evaluation
10.1 for Each Equation
Because mediation and moderation analyses consist of multiple regression equations, model fit is evaluated separately for each equation in the model.
for equation predicting :
for equation predicting :
Adjusted corrects for the number of predictors:
Where is the number of predictors in the equation.
10.2 for the Interaction Term
In moderation analysis, the incremental () quantifies how much variance the interaction term adds beyond the main effects of and :
The statistical significance of this increment is tested with an F-test:
With for a single interaction term.
Interpreting for interactions:
| Interpretation | |
|---|---|
| Negligible interaction | |
| Small but potentially meaningful | |
| Moderate interaction | |
| Large interaction |
⚠️ Interaction effects in observational data are typically small ( to ). Do not discard a theoretically supported interaction merely because is small — use power analysis to determine whether your study is adequately powered to detect the interaction.
10.3 Evaluating the Indirect Effect
Point Estimate:
The indirect effect is a point estimate. A non-zero point estimate alone is insufficient evidence for mediation.
Bootstrapped Confidence Intervals:
| CI Type | Description | Recommendation |
|---|---|---|
| Percentile CI | Simple quantiles of bootstrap distribution | Adequate for most purposes |
| BCa CI | Bias-corrected and accelerated | Preferred — corrects for bias and skewness |
| Normal-theory CI | Based on asymptotic normality assumption | Not recommended — assumes normality |
| Monte Carlo CI | Based on parametric sampling from coefficient distributions | Good alternative to bootstrap |
Decision rule: If the 95% BCa CI for excludes zero → significant indirect effect (mediation is supported). If it includes zero → insufficient evidence for mediation.
10.4 Effect Sizes for Mediation
Several effect size measures are available for the indirect effect:
(Preacher & Kelley, 2011): The ratio of the indirect effect to the maximum possible indirect effect given the data:
Ranges from 0 to 1. Benchmarks: small = 0.01, medium = 0.09, large = 0.25.
Completely Standardised Indirect Effect (): The indirect effect when all variables are standardised:
Proportion Mediated ():
(use with caution; see Section 3.3)
10.5 Effect Sizes for Moderation
(Cohen's effect size for regression):
| Effect Size | |
|---|---|
| Small | |
| Medium | |
| Large |
💡 For interactions in observational data, to is common. Use this as input for power analysis with GPower or DataStatPro's power module to determine minimum required sample size.*
10.6 Confidence Intervals for Simple Slopes
Each simple slope (conditional effect of at a specific value of ) has:
- A standard error (derived from the variance-covariance matrix of the coefficients).
- A t-statistic (slope / SE).
- A 95% confidence interval: slope SE.
A simple slope whose 95% CI excludes zero is statistically significant — the effect of on is significantly different from zero at that value of .
10.7 Omnibus Fit Summary
For the full model, report:
| Statistic | What to Report | When |
|---|---|---|
| Variance in explained by model | All mediation models | |
| Variance in explained by model | All models | |
| , | Overall model significance | All models |
| (interaction) | Interaction coefficient, SE, , | All moderation models |
| Increment from interaction | All moderation models | |
| (indirect) | Indirect effect with BCa CI | All mediation models |
| Index of moderated mediation with BCa CI | All conditional process models | |
| Effect size for interaction | Moderation and conditional process | |
| Effect size for indirect effect | Mediation |
11. Advanced Topics
11.1 Multicategorical Predictors in Mediation and Moderation
When is a multicategorical variable with groups, it must be represented by dummy variables (or Helmert/effects codes). For a 3-group predictor (: Control, Treatment A, Treatment B) with Control as the reference:
if Treatment A, 0 otherwise
if Treatment B, 0 otherwise
In mediation: Separate a-paths (, ) and a single b-path are estimated. The indirect effect for Treatment A vs. Control is ; for Treatment B vs. Control it is .
In moderation: Separate interaction terms are formed: and . Each interaction tests whether the moderation pattern differs between that treatment and the reference group.
11.2 Covariates in Mediation and Moderation
Covariates (control variables ) can be added to any equation in the model. Their role is to adjust for confounders and increase precision.
In mediation with covariates:
The indirect effect now represents the effect of on through , controlling for . The covariate can have different coefficients in the two equations ().
Best practice: Include covariates consistently in both the mediator and outcome equations unless there is a specific theoretical reason to exclude them from one equation.
11.3 Within-Person (Longitudinal) Mediation
Standard mediation assumes cross-sectional data. When measurements are taken longitudinally (e.g., at Time 1, at Time 2, at Time 3), several approaches are available:
Simple longitudinal mediation: Use the same model structure but with temporally ordered variables. The indirect effect is more interpretable causally.
Cross-Lagged Panel Model (CLPM): Simultaneously models the cross-lagged effects ( predicting , predicting , etc.) and autoregressive effects ( predicting , etc.).
Random Intercept Cross-Lagged Panel Model (RI-CLPM): Separates between-person and within-person effects — more appropriate for causal mediation inference.
11.4 Sensitivity Analysis for Causal Mediation
Because the relationship (-path) may be confounded by unmeasured variables, a sensitivity analysis (Imai et al., 2010) quantifies how large a confound would need to be to nullify the indirect effect.
The sensitivity parameter is the correlation between the residuals of the mediator and outcome equations:
If , there is no unmeasured confounding of the relationship. The sensitivity analysis plots the indirect effect against and identifies the critical value at which the indirect effect becomes zero. A large indicates robustness to confounding; a small indicates fragility.
11.5 Power Analysis for Mediation and Moderation
Power for mediation (Monte Carlo approach):
For a given , , , , and , power is the proportion of simulated datasets in which the bootstrapped CI for excludes zero:
- Simulate datasets of size from the model with coefficients and .
- In each simulated dataset, compute the bootstrap CI for .
- Power = proportion of CIs that exclude zero.
Power for moderation (analytical approach):
Given target , desired power (typically 0.80), and (typically 0.05), use Cohen's power formula:
Where is obtained from power tables for the F-distribution and is the number of predictors. In G*Power: use "F-test: Linear Multiple Regression — Fixed model, deviation from zero" with .
11.6 Reporting Standards for Mediation and Moderation
The American Psychological Association (APA) and Journal Article Reporting Standards (JARS) recommend reporting the following for mediation and moderation:
For Mediation:
- Point estimate and 95% BCa CI for the indirect effect .
- Number of bootstrap samples used.
- Point estimates and significance tests for , , , and .
- Effect size ( or ).
- Proportion mediated (with appropriate caveats).
- Path diagram with all coefficients labelled.
For Moderation:
- The full regression table including all terms.
- and -test for the interaction term.
- Simple slopes (with SEs and 95% CIs) at low, mean, and high values of .
- Johnson-Neyman region of significance.
- An interaction plot.
- Effect size ().
For Conditional Process:
- All of the above, plus the conditional indirect effects table at each value of .
- Index of moderated mediation with bootstrapped 95% CI.
12. Worked Examples
Example 1: Simple Mediation — Stress, Rumination, and Depression
A researcher hypothesises that the effect of perceived stress () on depression () is mediated by rumination () — a pattern of repetitively thinking about one's distress.
Sample: adults. Estimator: OLS with BCa bootstrapping (). Variables: All measured on validated scales; all continuous.
Model equations:
Equation 1 (predicting rumination from stress):
Equation 2 (predicting depression from stress and rumination):
Total effect equation:
Effects Decomposition:
| Effect | Estimate | SE | 95% BCa CI | Significant? |
|---|---|---|---|---|
| Total effect () | 0.520 | 0.070 | [0.382, 0.658] | Yes |
| Direct effect () | 0.190 | 0.080 | [0.033, 0.347] | Yes |
| Indirect effect () | 0.335 | — | [0.215, 0.465] | Yes |
| Proportion mediated | 64.4% | — | — | — |
Verification: ✅ (rounding)
Effect Size: — large indirect effect.
Interpretation: The indirect effect of stress on depression through rumination is (95% BCa CI [0.215, 0.465]), indicating that rumination significantly mediates the stress-depression relationship. This is partial mediation — both the indirect effect (, CI excludes zero) and the direct effect (, ) are statistically significant. Approximately 64% of the total effect of stress on depression () is transmitted through rumination. Each one-unit increase in perceived stress is associated with a 0.62-unit increase in rumination (), which in turn is associated with a 0.54-unit increase in depression controlling for stress (), yielding a total indirect effect of points on the depression scale.
Example 2: Parallel Multiple Mediation — Training, Motivation, Self-Efficacy, and Performance
A management researcher hypothesises that training () improves job performance () through two parallel mechanisms: intrinsic motivation () and self-efficacy ().
Sample: employees. Method: BCa bootstrap, .
Model equations:
→ , ,
→ , ,
, ,
, , (motivation → performance)
, , (self-efficacy → performance)
Total effect:
Specific Indirect Effects:
| Path | IE | 95% BCa CI | Significant? |
|---|---|---|---|
| Training → Motivation → Performance | [0.086, 0.311] | Yes | |
| Training → Self-Efficacy → Performance | [0.091, 0.308] | Yes | |
| Total indirect | [0.201, 0.551] | Yes | |
| Direct effect () | [0.004, 0.436] | Yes | |
| Contrast ( vs. ) | [-0.152, 0.143] | No |
Interpretation: Both intrinsic motivation (IE = 0.187, 95% BCa CI [0.086, 0.311]) and self-efficacy (IE = 0.189, 95% BCa CI [0.091, 0.308]) significantly mediate the effect of training on job performance. The contrast between the two indirect effects is not significant (contrast = -0.002, 95% CI [-0.152, 0.143]), indicating that intrinsic motivation and self-efficacy transmit approximately equal portions of training's effect on performance. The total indirect effect (0.376) accounts for 63% of the total effect, indicating substantial partial mediation.
Example 3: Simple Moderation — Social Support Buffers Stress Effects on Burnout
A researcher hypothesises that the effect of work demands () on burnout () is weaker when social support () is high. All variables are mean-centred.
Sample: nurses. Method: OLS regression.
Model:
Results:
| Term | SE | 95% CI | |||
|---|---|---|---|---|---|
| Constant | 3.82 | 0.08 | 47.75 | [3.66, 3.98] | |
| Work Demands () | 0.58 | 0.09 | 6.44 | [0.400, 0.760] | |
| Social Support () | -0.31 | 0.08 | -3.88 | [-0.468, -0.152] | |
| Work Demands × Social Support () | -0.19 | 0.06 | -3.17 | [-0.308, -0.072] |
, ,
for interaction, , , (moderate)
Simple Slopes (Spotlight Analysis):
Values of : (−1SD), , (+1SD)
| Level | Simple Slope | SE | 95% CI | |||
|---|---|---|---|---|---|---|
| Low (SD) | 0.121 | 6.12 | [0.503, 0.979] | |||
| Mean | 0.090 | 6.44 | [0.400, 0.760] | |||
| High (SD) | 0.112 | 3.74 | [0.199, 0.639] |
Johnson-Neyman Analysis:
The effect of work demands on burnout is statistically significant () across the entire observed range of social support. However, the effect is significantly smaller at high social support () than at low social support ().
Interaction Plot:
Work demands effects on burnout:
- Low support (): Steep positive slope — high demands strongly increase burnout.
- Mean support: Moderate positive slope.
- High support (): Flatter positive slope — demands still increase burnout but less strongly.
Interpretation: There is a significant negative interaction between work demands and social support on burnout (, , ). Consistent with the buffering hypothesis, social support significantly attenuates the effect of work demands on burnout. The simple slope of work demands on burnout is 0.741 at low social support () but only 0.419 at high social support (). Although the effect of work demands remains significant at all levels of social support, its magnitude is substantially smaller when social support is high, providing support for the buffering effect of social support against work-related burnout.
Example 4: First-Stage Moderated Mediation — Exercise, Self-Efficacy, and Wellbeing (Moderated by Age)
A researcher proposes that age () moderates the first stage of the mediated process by which exercise () affects wellbeing () through self-efficacy (). Specifically, exercise may boost self-efficacy more strongly in younger adults than older adults, because younger people experience more immediate fitness gains from exercise.
Sample: adults (ages 18–70). Method: BCa bootstrap, . All continuous predictors mean-centred.
Equation 1 (a-path moderated by Age):
, , (effect of exercise on self-efficacy at mean age)
, , (effect of age on self-efficacy)
, , (interaction: exercise × age on self-efficacy)
Equation 2 (b-path unmoderated):
, , ; , ,
Conditional Indirect Effects:
Values of (Age): years (−1SD); ; years (+1SD)
| Age Level | Conditional a-path | 95% BCa CI | Significant? | ||
|---|---|---|---|---|---|
| Young (SD) | [0.842, 1.887] | Yes | |||
| Mean Age | [0.108, 0.435] | Yes | |||
| Older (SD) | [-1.298, -0.389] | Yes |
💡 Note: The reversal of the indirect effect direction at high age indicates that for older adults, exercise may unexpectedly reduce self-efficacy — perhaps due to increased fatigue or injury risk. This merits theoretical attention.
Index of Moderated Mediation:
95% BCa CI for IMM: → excludes zero → significant moderated mediation
Interpretation: The indirect effect of exercise on wellbeing through self-efficacy is significantly moderated by age (IMM = −0.103, 95% BCa CI [−0.178, −0.036]). The conditional indirect effects reveal a striking pattern: for younger adults ( below the mean age), the indirect effect is large and positive (IE = 1.346, 95% CI [0.842, 1.887]), indicating that exercise strongly boosts self-efficacy which in turn improves wellbeing. For adults at the mean age, the indirect effect is smaller but still positive (IE = 0.262, 95% CI [0.108, 0.435]). For older adults ( above mean age), the indirect effect reverses sign (IE = −0.821, 95% CI [−1.298, −0.389]), suggesting that exercise may counterintuitively reduce self-efficacy in this group. These findings highlight the critical role of age in determining whether exercise promotes self-efficacy and, ultimately, wellbeing.
Example 5: Second-Stage Moderated Mediation — Leadership, Trust, and Performance (Moderated by Autonomy)
A researcher tests whether autonomy () moderates the second stage (b-path) of the process by which transformational leadership () improves team performance () through team trust (). Trust may translate into performance more effectively in high- autonomy environments.
Sample: teams. Method: BCa bootstrap, .
Equation 1 (a-path unmoderated):
→ , ,
Equation 2 (b-path moderated by Autonomy):
, , ,
Conditional Indirect Effects:
| Autonomy Level | Conditional b-path | 95% BCa CI | Significant? | ||
|---|---|---|---|---|---|
| Low (SD) | [-0.038, 0.193] | No | |||
| Mean | [0.087, 0.325] | Yes | |||
| High (SD) | [0.181, 0.476] | Yes |
Index of Moderated Mediation:
95% BCa CI for IMM: → excludes zero → significant moderated mediation
Interpretation: The indirect effect of transformational leadership on team performance through trust is significantly moderated by team autonomy (IMM = 0.151, 95% BCa CI [0.063, 0.253]). The trust-based indirect pathway is significant for teams with mean autonomy (IE = 0.198, 95% CI [0.087, 0.325]) and high autonomy (IE = 0.321, 95% CI [0.181, 0.476]), but not for teams with low autonomy (IE = 0.074, 95% CI [−0.038, 0.193]). This suggests that transformational leadership builds trust, but this trust only translates into improved performance when the team operates in a sufficiently autonomous environment where trust can meaningfully guide decision-making and collaborative action.
13. Common Mistakes and How to Avoid Them
Mistake 1: Using the Baron-Kenny Causal Steps Approach
Problem: The Baron-Kenny (1986) procedure requires to significantly predict
before testing mediation. This is incorrect — a significant indirect effect can exist even
when the total effect is not significant (e.g., in the case of inconsistent mediation
where direct and indirect effects have opposite signs). The Baron-Kenny approach also uses
the Sobel test, which incorrectly assumes the sampling distribution of is normal.
Solution: Use the modern approach: bootstrap the indirect effect and construct a 95%
BCa CI. Test mediation by whether the CI for excludes zero — regardless of the
significance of .
Mistake 2: Claiming Causal Mediation from Cross-Sectional Data
Problem: Mediation analysis uses causal language (" affects through ") that
implies temporal precedence and absence of confounding. Cross-sectional data cannot establish
either condition — all three variables are measured simultaneously, making it impossible to
confirm that caused before caused .
Solution: Acknowledge this limitation explicitly. Use language such as "consistent with
a mediation process" or "results support the hypothesised mediation pathway." Where possible,
use longitudinal designs or experimental manipulation of and/or .
Mistake 3: Not Mean-Centering Before Computing the Interaction Term
Problem: Using raw (uncentred) scores to compute the interaction term often
produces severe multicollinearity — VIFs for , , and can exceed 30–50.
This inflates standard errors and makes the main effects ( and ) uninterpretable
(they represent the effect at and , which may be completely outside the
observed range of the data).
Solution: Always mean-centre (or standardise) continuous predictors and moderators before
computing interaction terms. This reduces multicollinearity, makes main effects interpretable
at the mean of the other variable, and has no effect on the interaction coefficient .
Mistake 4: Interpreting the Main Effect of X as the "Effect of X" in a Moderation Model
Problem: In a moderation model , is
NOT the overall effect of on . It is the conditional effect of when
(or at the mean of if centred). Reporting as the "main effect of " and
interpreting it in isolation is incorrect when a significant interaction is present.
Solution: When the interaction is significant, focus on the simple slopes at meaningful
values of rather than interpreting in isolation. Only report as "the effect
of at the mean of " (after centering).
Mistake 5: Running Separate Simple Mediations Instead of Parallel Mediation
Problem: When testing multiple mediators, some researchers run separate simple mediation
models (one mediator at a time). This produces biased estimates because each specific indirect
effect does not control for the other mediators. The total of the specific indirect effects
from separate models will not equal the total indirect effect from a simultaneous model.
Solution: Always include all hypothesised mediators in a single parallel mediation model.
The specific indirect effects from this model correctly partial out the shared variance among
mediators.
Mistake 6: Ignoring the Direction and Meaning of the Interaction
Problem: Researchers sometimes report "a significant interaction was found" without fully
probing and plotting it. A significant is only the starting point — the nature and
direction of the interaction must be unpacked through simple slopes analysis and a plot to
be meaningfully interpreted and communicated.
Solution: Always: (a) compute and report simple slopes at low, mean, and high values of ;
(b) create and include an interaction plot; (c) describe in plain language what the interaction
means (e.g., "the effect of on was stronger/weaker/reversed when was high").
Mistake 7: Concluding Partial vs. Full Mediation Based on Significance
Problem: Classifying mediation as "partial" ( significant) or "full" ( not
significant) based on whether the direct effect is statistically significant is misleading.
With large samples, trivially small direct effects are "significant," leading to "partial
mediation." With small samples, substantial direct effects may be "non-significant," incorrectly
suggesting "full mediation." Statistical significance of depends on sample size, not
on the theoretical importance of the direct path.
Solution: Report and interpret the magnitude of relative to (proportion
mediated or ). Reserve "full mediation" for cases where the direct effect is both
non-significant AND practically negligible (close to zero in effect size terms).
Mistake 8: Using Too Few Bootstrap Samples
Problem: Using fewer than 1,000 bootstrap samples produces unstable CI estimates,
especially near the CI boundaries. The same analysis run twice with 500 bootstrap samples
may produce noticeably different CI bounds.
Solution: Use a minimum of bootstrap samples for exploratory work and
for published research. DataStatPro defaults to 5,000; increase to 10,000
for publication-ready analyses.
Mistake 9: Ignoring Sequential Ordering in Serial Mediation
Problem: In sequential mediation, the causal order of mediators (
vs. ) is a theoretical claim that changes all model equations, indirect
effects, and conclusions. Researchers sometimes arbitrarily choose an order or test both orders
and report the "better" one without theoretical justification.
Solution: Specify the causal order of mediators based on theory and, ideally, temporal
precedence in data collection. If the order is theoretically ambiguous, conduct both models as
a sensitivity check and clearly acknowledge the uncertainty in conclusions.
Mistake 10: Failing to Report the Index of Moderated Mediation
Problem: In conditional process models, researchers sometimes report only the conditional
indirect effects at specific values of (e.g., "the indirect effect was significant at
high but not at low "), without testing whether the indirect effect is significantly
moderated overall. Differences in significance at different values of do not by themselves
constitute evidence that the indirect effect differs significantly across those values.
Solution: Always compute and report the index of moderated mediation (
or ) with its bootstrapped 95% CI. A CI that excludes zero is the primary
test that the indirect effect is significantly moderated by .
14. Troubleshooting
| Problem | Likely Cause | Solution |
|---|---|---|
| Indirect effect CI is very wide | Small sample; weak or path; high variability | Increase sample size; use standardised variables; check for outliers |
| Indirect effect is non-zero but CI includes zero | Insufficient power; inconsistent mediation | Increase ; increase (bootstrap samples); check for sign changes in paths |
| do not sum to (large discrepancy) | Rounding error; mediators correlated; computational error | Verify variable coding; use unstandardised coefficients; recheck calculations |
| VIF for , , or | Predictors not centred; extreme multicollinearity | Mean-centre all continuous predictors and moderators before computing interactions |
| Interaction non-significant despite theoretical prediction | Insufficient power for small ; wrong functional form; wrong moderator | Conduct a priori power analysis; check for non-linear interaction; try alternative moderators |
| Simple slopes all in same direction despite significant interaction | The interaction changes magnitude but not direction | Report the magnitude change; use Johnson-Neyman to find where effect size changes meaningfully |
| Proportion mediated exceeds 1.0 or is negative | Inconsistent mediation ( and have opposite signs); total effect near zero | Do not interpret proportion mediated in this case; report only and separately |
| Bootstrapped CI is asymmetric around point estimate | Skewed bootstrap distribution; small ; near-zero paths | Expected and acceptable; BCa CI handles this; do not report Sobel-based symmetric CI |
| is very small () | is a weak predictor of ; a-path is trivially small | Check whether is the correct mediator; assess and path magnitudes separately |
| Model equations fail to converge | Perfect multicollinearity; sample too small for model complexity | Reduce predictors; mean-centre; simplify model; collect more data |
| All simple slopes significant at all values of | Very strong main effect dominates interaction | Interaction may still be meaningful; report magnitude changes using Johnson-Neyman |
| Sequential mediation indirect effects do not sum correctly | Error in path specification; correlations among mediators not accounted for | Check that the model equation for includes as a predictor |
| IMM (index of moderated mediation) CI includes zero despite conditional IEs varying | Conditional IEs may differ descriptively but not statistically | IMM is the correct test; do not claim significant moderated mediation without IMM CI excluding zero |
| Bootstrap results differ substantially across runs | Too few bootstrap samples; seed not set | Increase to 10,000; set a fixed random seed for reproducibility |
15. Quick Reference Cheat Sheet
Core Equations
| Formula | Description |
|---|---|
| Path a equation (simple mediation) | |
| Path b and c' equation (simple mediation) | |
| Indirect effect | |
| Total effect identity | |
| Proportion mediated (use with caution) | |
| Standard error of the indirect effect (Sobel) | |
| Simple moderation model | |
| Conditional effect of at | |
| SE of simple slope | |
| Conditional IE (first-stage moderation) | |
| Conditional IE (second-stage moderation) | |
| Conditional IE (both-stage moderation) | |
| Index of moderated mediation (first-stage) | |
| Index of moderated mediation (second-stage) | |
| Incremental for interaction | |
| Cohen's for interaction |
Model Selection Guide
| Research Question | Appropriate Model |
|---|---|
| How does affect ? (one mediator) | Simple Mediation |
| Does affect through multiple mechanisms? | Parallel Multiple Mediation |
| Is there a causal chain ? | Sequential Mediation |
| When/for whom does affect ? (one moderator) | Simple Moderation |
| Do two moderators jointly change the effect? | Multiple Moderation |
| Does the moderation of vary with a third variable? | Moderated Moderation (Three-Way) |
| Does the indirect effect () depend on level of ? (W on a-path) | First-Stage Moderated Mediation |
| Does the indirect effect () depend on level of ? (W on b-path) | Second-Stage Moderated Mediation |
| Does simultaneously moderate both and paths? | Both-Stage Moderated Mediation |
| Why does the interaction on exist? | Mediated Moderation |
| Does moderate a path in a chain? | Sequential Moderated Mediation |
Mediation Effect Interpretation
| Component | Symbol | Interpretation |
|---|---|---|
| a-path | Effect of on | |
| b-path | Effect of on , controlling for | |
| Direct effect | Effect of on , controlling for | |
| Total effect | Effect of on without in model | |
| Indirect effect | Effect of on transmitted through | |
| Proportion mediated | Fraction of total effect through |
Moderation Effect Interpretation
| Pattern | Sign of | Interpretation |
|---|---|---|
| Enhancing moderation | High strengthens | |
| Buffering moderation | High weakens | |
| Crossover interaction | (changes sign) | High reverses direction of |
| No moderation | Effect of on is constant across |
Key Decision Rules
| Decision Point | Rule |
|---|---|
| Is mediation significant? | 95% BCa CI for excludes zero |
| Is moderation significant? | , , |
| Is conditional process significant? | 95% BCa CI for IMM excludes zero |
| Is simple slope significant at value ? | 95% CI for excludes zero |
| Should I use Baron-Kenny? | No — always use bootstrapped indirect effects |
| Full vs. partial mediation? | Avoid classification; report magnitude and effect size |
Effect Size Benchmarks
| Statistic | Small | Medium | Large |
|---|---|---|---|
| (indirect effect) | 0.01 | 0.09 | 0.25 |
| (interaction) | 0.02 | 0.15 | 0.35 |
| (interaction, observational) | 0.01 | 0.05 | 0.10 |
| (standardised indirect) | 0.01 | 0.06 | 0.14 |
Minimum Sample Size Guidelines
| Model | Minimum | Recommended |
|---|---|---|
| Simple mediation | 100 | |
| Parallel mediation (2 mediators) | 150 | |
| Sequential mediation (2 mediators) | 200 | |
| Simple moderation | 100 | |
| Multiple moderation | 200 | |
| Three-way (moderated moderation) | 300 | |
| Moderated mediation (one stage) | 200 | |
| Both-stage moderated mediation | 300 | |
| Sequential moderated mediation | 350 |
Bootstrap Confidence Interval Recommendations
| Situation | Method | B |
|---|---|---|
| Exploratory / pilot research | Percentile CI | 5,000 |
| Published research (standard) | BCa CI | 10,000 |
| Very skewed distribution | BCa CI | 10,000 |
| Robustness check | Monte Carlo CI | 20,000 |
| Near-zero indirect effect | BCa CI | 10,000 |
This tutorial provides a comprehensive foundation for understanding, specifying, estimating, and interpreting Mediation, Moderation, and Conditional Process Analysis using the DataStatPro application. For further reading, consult Hayes' "Introduction to Mediation, Moderation, and Conditional Process Analysis" (3rd ed., 2022), MacKinnon's "Introduction to Statistical Mediation Analysis" (2008), and Preacher & Hayes' "Asymptotic and Resampling Strategies for Assessing and Comparing Indirect Effects in Multiple Mediator Models" (2008). For feature requests or support, contact the DataStatPro team.