Knowledge Base / Mediation and Moderation Analysis Advanced Analysis 74 min read

Mediation and Moderation Analysis

Comprehensive reference guide for mediation and moderation analysis in behavioral research.

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

  1. Prerequisites and Background Concepts
  2. What is Mediation and Moderation Analysis?
  3. The Mathematics Behind Mediation and Moderation
  4. Assumptions of Mediation and Moderation Analysis
  5. Types of Mediation and Moderation Models
  6. Using the Mediation and Moderation Component
  7. Mediation Analysis
  8. Moderation Analysis
  9. Conditional Process Analysis
  10. Model Fit and Evaluation
  11. Advanced Topics
  12. Worked Examples
  13. Common Mistakes and How to Avoid Them
  14. Troubleshooting
  15. 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 XX and an outcome YY:

Y=b0+b1X+eY = b_0 + b_1 X + e

Where:

Multiple linear regression extends this to include several predictors:

Y=b0+b1X1+b2X2++bkXk+eY = b_0 + b_1 X_1 + b_2 X_2 + \dots + b_k X_k + e

Each coefficient bjb_j represents the partial effect of XjX_j on YY, 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 (bb) are expressed in the original units of XX and YY. They answer: "For a one-unit increase in XX, how many units does YY change?"

Standardised coefficients (β\beta) are expressed in standard deviation units and are obtained by standardising all variables (mean = 0, SD = 1) before analysis:

βj=bjσXjσY\beta_j = b_j \cdot \frac{\sigma_{X_j}}{\sigma_Y}

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:

The path coefficient on each arrow is the regression coefficient (bb or β\beta) 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 XX on MM (the mediator), and the effect of MM on YY (the outcome, controlling for XX):

Indirect Effect=a×b\text{Indirect Effect} = a \times b

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 XX and WW is represented by their product:

X×WX \times W

When this product term is included in a regression model, it captures how the effect of XX on YY depends on the level of WW. This is the mathematical basis of moderation analysis. The interaction term is NOT the same as the sum or average of XX and WW — 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:

θXYW=w=b1+b3w\theta_{X \rightarrow Y \mid W=w} = b_1 + b_3 \cdot w

This reads: "The effect of XX on YY when W=wW = w equals b1+b3×wb_1 + b_3 \times w." 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 a×ba \times b). The algorithm is:

  1. Draw BB bootstrap samples of size nn from the original data with replacement.
  2. Compute the statistic of interest (e.g., indirect effect a^×b^\hat{a} \times \hat{b}) in each bootstrap sample.
  3. The distribution of the BB bootstrap estimates approximates the sampling distribution.
  4. 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 B=5,000B = 5{,}000 to B=10,000B = 10{,}000 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 XX affect YY?

"Does the effect of stress (XX) on depression (YY) operate through rumination (MM)?"

Moderation asks WHEN or FOR WHOM does XX affect YY?

"Is the effect of stress (XX) on depression (YY) stronger for people with low social support (WW) compared to people with high social support (WW)?"

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

ConceptQuestionMechanismVariable Type
MediationHow/Why?XMYX \rightarrow M \rightarrow YMM is a mediator (intermediate variable)
ModerationWhen/For whom?WW changes the XYX \rightarrow Y relationshipWW is a moderator (context variable)
Conditional ProcessHow AND When?Indirect effect depends on WWBoth MM (mediator) and WW (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

FieldMediation ExampleModeration Example
PsychologyExercise → Self-efficacy → WellbeingExercise → Wellbeing (stronger for introverts)
MedicineDrug → Inflammation reduction → Pain reliefDrug → Pain relief (varies by genetic marker)
EducationTraining → Self-regulation → Academic performanceTraining → Performance (varies by prior knowledge)
MarketingAd exposure → Brand attitude → Purchase intentAd exposure → Purchase (stronger for low involvement)
ManagementLeadership style → Motivation → ProductivityLeadership → Productivity (varies by culture)
Public HealthPolicy → Behaviour change → Health outcomePolicy → Health (varies by socioeconomic status)
NeuroscienceStress → Cortisol → Memory impairmentStress → Memory (moderated by amygdala volume)
Social SciencePoverty → Social isolation → CrimePoverty → 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 XX, a mediator MM, and an outcome YY. It requires two regression equations:

Equation 1 — Predicting the mediator from XX:

M=iM+aX+eMM = i_M + aX + e_M

Equation 2 — Predicting the outcome from both XX and MM:

Y=iY+cX+bM+eYY = i_Y + c'X + bM + e_Y

Where:

3.2 The Three Effects in Mediation

The Total Effect (cc):

The total effect is the effect of XX on YY without including MM:

Y=iY+cX+eYY = i_Y + cX + e_Y

cc combines the direct and indirect pathways.

The Indirect Effect (a×ba \times b):

The indirect effect is the product of the aa-path and the bb-path:

Indirect Effect=a×b\text{Indirect Effect} = a \times b

It quantifies how much of the effect of XX on YY is transmitted through MM.

The Direct Effect (cc'):

The direct effect is the effect of XX on YY after accounting for MM:

c=cabc' = c - ab

The Fundamental Identity:

The total effect equals the direct effect plus the indirect effect:

c=c+abc = c' + ab

This decomposition is the cornerstone of mediation analysis. Every unit of the total effect can be attributed to either the direct path (cc') or the indirect path through the mediator (abab).

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:

PM=abc=abc+ab=1ccPM = \frac{ab}{c} = \frac{ab}{c' + ab} = 1 - \frac{c'}{c}

⚠️ The proportion mediated is unreliable when the total effect cc is near zero (even if the indirect effect abab 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 kk parallel mediators M1,M2,,MkM_1, M_2, \dots, M_k, the model uses k+1k + 1 equations:

Equations for each mediator j=1,,kj = 1, \dots, k:

Mj=iMj+ajX+eMjM_j = i_{M_j} + a_j X + e_{M_j}

Outcome equation:

Y=iY+cX+b1M1+b2M2++bkMk+eYY = i_Y + c'X + b_1 M_1 + b_2 M_2 + \dots + b_k M_k + e_Y

Specific indirect effect through mediator jj:

Indirectj=ajbj\text{Indirect}_j = a_j b_j

Total indirect effect:

Total Indirect=j=1kajbj\text{Total Indirect} = \sum_{j=1}^{k} a_j b_j

Total effect:

c=c+j=1kajbjc = c' + \sum_{j=1}^{k} a_j b_j

Contrasts between indirect effects: The difference between two specific indirect effects can be tested:

Contrastjk=ajbjakbk\text{Contrast}_{jk} = a_j b_j - a_k b_k

A bootstrapped CI for this contrast that excludes zero indicates that mediators jj and kk transmit significantly different portions of the effect of XX to YY.

3.5 Sequential (Serial) Mediation

With two sequential mediators M1M_1 and M2M_2 (where M1M_1 precedes M2M_2 on the causal chain):

Equation 1:

M1=iM1+a1X+eM1M_1 = i_{M_1} + a_1 X + e_{M_1}

Equation 2:

M2=iM2+a2X+d21M1+eM2M_2 = i_{M_2} + a_2 X + d_{21} M_1 + e_{M_2}

Equation 3:

Y=iY+cX+b1M1+b2M2+eYY = i_Y + c'X + b_1 M_1 + b_2 M_2 + e_Y

Where d21d_{21} is the effect of M1M_1 on M2M_2.

The three indirect effects:

PathIndirect EffectInterpretation
XM1YX \rightarrow M_1 \rightarrow Ya1b1a_1 b_1Through M1M_1 only
XM2YX \rightarrow M_2 \rightarrow Ya2b2a_2 b_2Through M2M_2 only
XM1M2YX \rightarrow M_1 \rightarrow M_2 \rightarrow Ya1d21b2a_1 d_{21} b_2Through both mediators sequentially

Total indirect effect:

Total Indirect=a1b1+a2b2+a1d21b2\text{Total Indirect} = a_1 b_1 + a_2 b_2 + a_1 d_{21} b_2

Total effect identity:

c=c+a1b1+a2b2+a1d21b2c = c' + a_1 b_1 + a_2 b_2 + a_1 d_{21} b_2

3.6 The Simple Moderation (Interaction) Model

The simple moderation model includes the predictor XX, the moderator WW, and their product:

Y=b0+b1X+b2W+b3(X×W)+eY = b_0 + b_1 X + b_2 W + b_3 (X \times W) + e

Where:

The conditional effect of XX on YY at a specific value ww of WW:

θ^XY(w)=b1+b3w\hat{\theta}_{X \rightarrow Y}(w) = b_1 + b_3 w

This is the simple slope of YY on XX at the value W=wW = w. The moderation hypothesis is tested by examining whether b30b_3 \neq 0.

3.7 Centering in Moderation Analysis

Mean-centering the predictor and moderator before computing the interaction term is strongly recommended:

Xc=XXˉ,Wc=WWˉX_c = X - \bar{X}, \quad W_c = W - \bar{W}

The model becomes:

Y=b0+b1Xc+b2Wc+b3(Xc×Wc)+eY = b_0 + b_1 X_c + b_2 W_c + b_3 (X_c \times W_c) + e

Benefits of mean-centering:

⚠️ Centering does NOT change b3b_3 (the interaction coefficient) or the model's R2R^2. It only changes the interpretation of b1b_1 and b2b_2 and reduces multicollinearity.

3.8 Probing the Interaction: Simple Slopes

After establishing a significant interaction (b30b_3 \neq 0), the interaction must be probed to understand its nature. The simple slopes method computes the conditional effect of XX on YY at representative values of WW:

Standard values of WW (Pick-a-point approach):

Simple slope at each value ww:

θ^XY(w)=b1+b3w\hat{\theta}_{X \rightarrow Y}(w) = b_1 + b_3 w

Standard error of the simple slope:

SE[θ^(w)]=Var^(b1)+2wCov^(b1,b3)+w2Var^(b3)SE[\hat{\theta}(w)] = \sqrt{\widehat{\text{Var}}(b_1) + 2w \cdot \widehat{\text{Cov}}(b_1, b_3) + w^2 \cdot \widehat{\text{Var}}(b_3)}

t-statistic for the simple slope:

t=θ^(w)SE[θ^(w)]t = \frac{\hat{\theta}(w)}{SE[\hat{\theta}(w)]}

With df=nk1df = n - k - 1 where kk is the number of predictors.

Johnson-Neyman (Floodlight) Method: Rather than evaluating at specific values of WW, the Johnson-Neyman technique finds the exact value(s) of WW at which the simple slope transitions from significant to non-significant (the region of significance):

w=b1b3±tα/2b32Var^(b1)(tα/22b12)Var^(b3)+2b1b3Cov^(b1,b3)b32tα/22Var^(b3)w^* = \frac{-b_1 b_3 \pm t_{\alpha/2} \sqrt{b_3^2 \widehat{\text{Var}}(b_1) - (t_{\alpha/2}^2 - b_1^2)\widehat{\text{Var}}(b_3) + 2b_1 b_3 \widehat{\text{Cov}}(b_1, b_3)}}{b_3^2 - t_{\alpha/2}^2 \widehat{\text{Var}}(b_3)}

The region of significance is the range of WW values where the simple slope of XX on YY is statistically significant (p<αp < \alpha).

3.9 The Conditional Process Model — Moderated Mediation

The moderated mediation model combines mediation and moderation. The indirect effect a×ba \times b becomes a function of the moderator WW:

General form (moderator on the aa-path):

M=iM+a1X+a2W+a3(X×W)+eMM = i_M + a_1 X + a_2 W + a_3 (X \times W) + e_M

Y=iY+cX+bM+eYY = i_Y + c'X + bM + e_Y

The conditional indirect effect at value ww of WW:

Indirect Effect(w)=(a1+a3w)×b\text{Indirect Effect}(w) = (a_1 + a_3 w) \times b

This is a linear function of WW. The index of moderated mediation (Hayes, 2015) is a3ba_3 b:

General form (moderator on the bb-path):

M=iM+aX+eMM = i_M + a X + e_M

Y=iY+cX+b1M+b2W+b3(M×W)+eYY = i_Y + c'X + b_1 M + b_2 W + b_3 (M \times W) + e_Y

The conditional indirect effect at value ww of WW:

Indirect Effect(w)=a×(b1+b3w)\text{Indirect Effect}(w) = a \times (b_1 + b_3 w)

Index of moderated mediation: a×b3a \times b_3


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: XX must precede MM in time, and MM must precede YY in time.

Why it matters: Mediation analysis estimates causal indirect effects. If the temporal order is wrong (e.g., MM actually precedes XX), the computed a×ba \times b product does not represent a causal indirect effect — it is merely a partial correlation.

How to check:

⚠️ 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 XMX \rightarrow M relationship and the MYM \rightarrow Y 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 CC affects both MM and YY, the bb-path estimate (effect of MM on YY) is biased, and the indirect effect abab does not represent a causal effect.

How to address:

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:

4.4 Normally Distributed Residuals

The residuals eMe_M and eYe_Y should be approximately normally distributed. This is required for the validity of t-tests and F-tests of regression coefficients.

How to check:

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:

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:

4.7 No Perfect Multicollinearity

Predictors should not be perfectly correlated with each other. In moderation analysis, the interaction term X×WX \times W is often highly correlated with XX and WW individually (multicollinearity), which can inflate standard errors and destabilise coefficient estimates.

How to check:

Remedy: Mean-center XX and WW before forming the interaction term X×WX \times W (as described in Section 3.7). This substantially reduces multicollinearity without changing b3b_3.

4.8 Adequate Sample Size and Statistical Power

Mediation analysis (especially bootstrapped indirect effects) requires sufficient sample size for stable and reproducible results:

Model TypeMinimum nnRecommended nn
Simple mediation100200\geq 200
Parallel mediation (2 mediators)150300\geq 300
Sequential mediation200400\geq 400
Simple moderation100200\geq 200
Moderated mediation200400\geq 400
Complex conditional process300500\geq 500

💡 Use Monte Carlo power analysis (e.g., via the pwrss or pwr2ppl packages 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

ModelStructureKey Feature
Simple MediationXMYX \rightarrow M \rightarrow YOne mediator; single indirect path
Parallel Multiple MediationX{M1,M2,,Mk}YX \rightarrow \{M_1, M_2, \dots, M_k\} \rightarrow YMultiple mediators operating simultaneously; not causally connected
Sequential (Serial) MediationXM1M2YX \rightarrow M_1 \rightarrow M_2 \rightarrow YMediators are causally chained; M1M_1 affects M2M_2
Multiple Sequential MediationXM1M2M3YX \rightarrow M_1 \rightarrow M_2 \rightarrow M_3 \rightarrow YThree or more sequential mediators
Partial MediationXMYX \rightarrow M \rightarrow Y AND XYX \rightarrow YBoth direct and indirect effects are non-zero
Full MediationXMYX \rightarrow M \rightarrow Y (direct = 0)All of XX's effect on YY operates through MM
Inconsistent Mediationab>0ab > 0 but c<0c < 0 (or vice versa)Direct and indirect effects have opposite signs

5.2 Moderation Models

ModelStructureKey Feature
Simple ModerationWW moderates XYX \rightarrow YOne moderator; one interaction term
Multiple ModerationW1W_1 and W2W_2 both moderate XYX \rightarrow YTwo moderators tested simultaneously
Three-Way (Moderated Moderation)VV moderates the W×XW \times X interactionThe interaction itself is moderated
Moderated Regression with CovariatesModeration with control variablesInteraction tested after controlling for confounders

5.3 Conditional Process Models (Moderated Mediation / Mediated Moderation)

ModelWhere Moderation OccursHayes PROCESS Model
Moderated Mediation (First-Stage)WW moderates the aa-path (XMX \rightarrow M)Model 7
Moderated Mediation (Second-Stage)WW moderates the bb-path (MYM \rightarrow Y)Model 14
Moderated Mediation (Both Stages)WW moderates both aa and bb pathsModel 58
Moderated Mediation (Direct Path)WW moderates the direct effect cc'Model 5
Mediated ModerationMM mediates the X×WYX \times W \rightarrow Y interactionModel 8
Sequential Moderated MediationWW moderates a path in a sequential mediation modelModels 83, 84, 85
Dual Moderated MediationTwo separate moderators on two different pathsModel 21

5.4 Key Terminology Clarification

TermDefinitionNotes
Indirect Effecta×ba \times b (product of path coefficients through MM)The core quantity in mediation
Direct Effectcc' (effect of XX on YY after accounting for MM)Residual effect not through MM
Total Effectc=c+abc = c' + abSum of direct and all indirect effects
Conditional Direct Effectc(w)=b1+b3wc'(w) = b_1 + b_3 wDirect effect that varies with WW
Conditional Indirect Effecta(w)×ba(w) \times b or a×b(w)a \times b(w)Indirect effect that varies with WW
Index of Moderated MediationCoefficient linking WW to the indirect effecta3ba_3 b or ab3a b_3
Region of SignificanceRange of WW where simple slope is p<.05p < .05From Johnson-Neyman method
Floodlight AnalysisJohnson-Neyman visualisation across all values of WWShows 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:

💡 Tip: Run descriptive statistics (means, SDs, skewness) before mediation/moderation analysis. Extreme skewness (z>2|z| > 2) may affect the normality of residuals and make bootstrapped CIs preferable.

Step 2 — Select Analysis Type

Choose from the "Analysis Type" dropdown:

Step 3 — Specify the Model Structure

⚠️ 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:

Step 5 — Select Probing Options (for Moderation)

Specify how to probe significant interactions:

💡 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

💡 Recommendation: Use BCa bootstrapped CIs with B=10,000B = 10{,}000 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):

Step 8 — Display Options

Select which outputs and visualisations to display:

Step 9 — Run the Analysis

Click "Run Analysis". The application will:

  1. Estimate all regression equations using OLS.
  2. Compute direct, indirect, and total effects.
  3. Generate BB bootstrap samples and compute the bootstrap distribution of indirect effects.
  4. Construct BCa bootstrapped confidence intervals for all indirect effects.
  5. Compute simple slopes at all specified values of WW.
  6. Compute the Johnson-Neyman region of significance.
  7. Generate all selected visualisations and output tables.

7. Mediation Analysis

7.1 Simple Mediation

Simple mediation tests whether the effect of XX on YY is transmitted through a single mediator MM. This is the foundational mediation model.

7.1.1 Model Specification

The model requires two regression equations:

Path a equation:

M=iM+aX+eMM = i_M + a X + e_M

Path b and c' equation:

Y=iY+cX+bM+eYY = i_Y + c'X + bM + e_Y

Total effect equation (for reference):

Y=iY+cX+eYY = i_Y + cX + e_Y

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:

  1. XX significantly predicts YY (total effect cc significant).
  2. XX significantly predicts MM (a-path significant).
  3. MM significantly predicts YY controlling for XX (b-path significant).
  4. The effect of XX on YY is reduced when MM is included (c<cc' < c).

⚠️ 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 abab:

  1. Estimate a^\hat{a} and b^\hat{b} from the data.
  2. Compute a^×b^\hat{a} \times \hat{b} (point estimate of indirect effect).
  3. Generate B=5,000B = 5{,}000 bootstrap samples.
  4. Compute a^b×b^b\hat{a}^*_b \times \hat{b}^*_b in each bootstrap sample bb.
  5. Construct the 95% BCa CI from the bootstrap distribution.
  6. Decision: If the 95% CI for abab excludes zero → significant mediation.

7.1.4 Types of Mediation Based on Effect Sizes

Patternccababcc'Classification
No mediationsignot sigsigDirect effect only
Full mediationsigsignot sigAll effect through MM
Partial mediationsigsigsig (same sign)Both direct and indirect
Inconsistent mediationsmall/not sigsigsig (opposite sign)Suppression; c>cc' > c
Competitive mediationsigsigsig (opposite sign)Direct and indirect cancel

7.1.5 Worked Calculation — Simple Mediation

Suppose n=250n = 250, and we test whether self-efficacy (MM) mediates the effect of exercise (XX, hours/week) on wellbeing (YY, 0–100 scale).

Path a equation (predicting self-efficacy from exercise):

M^=4.20+0.58X\hat{M} = 4.20 + 0.58 Xa^=0.58\hat{a} = 0.58, SE=0.11SE = 0.11, p<.001p < .001

Path b and c' equation (predicting wellbeing from exercise and self-efficacy):

Y^=21.30+0.31X+0.44M\hat{Y} = 21.30 + 0.31 X + 0.44 Mb^=0.44\hat{b} = 0.44, c^=0.31\hat{c'} = 0.31

Total effect (predicting wellbeing from exercise only):

Y^=23.15+0.57X\hat{Y} = 23.15 + 0.57 Xc^=0.57\hat{c} = 0.57

Indirect effect:

a^×b^=0.58×0.44=0.255\hat{a} \times \hat{b} = 0.58 \times 0.44 = 0.255

Verification: c+ab=0.31+0.255=0.565c=0.57c' + ab = 0.31 + 0.255 = 0.565 \approx c = 0.57

Bootstrap 95% BCa CI for indirect effect: [0.132,0.403][0.132, 0.403]

Conclusion: The indirect effect of exercise on wellbeing through self-efficacy is ab=0.255ab = 0.255 (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 (c=0.31c' = 0.31) 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 XX affects YY through two or more simultaneous mediators that are not causally connected to each other.

7.2.1 Model Specification (Two Mediators)

Path equations:

M1=iM1+a1X+eM1M_1 = i_{M_1} + a_1 X + e_{M_1}

M2=iM2+a2X+eM2M_2 = i_{M_2} + a_2 X + e_{M_2}

Y=iY+cX+b1M1+b2M2+eYY = i_Y + c'X + b_1 M_1 + b_2 M_2 + e_Y

Path diagram:

      a₁         b₁
 ────────→ M₁ ────────↘

X ──────↗ Y ────────→ M₂ ────────↗ a₂ b₂ ↘────────────↗ c'

7.2.2 Effects Decomposition

EffectFormulaDescription
Specific indirect via M1M_1a1b1a_1 b_1Effect through mediator 1
Specific indirect via M2M_2a2b2a_2 b_2Effect through mediator 2
Total indirecta1b1+a2b2a_1 b_1 + a_2 b_2Combined indirect effect
Direct effectcc'Effect not through any mediator
Total effectc+a1b1+a2b2c' + a_1 b_1 + a_2 b_2All pathways combined
Contrast (M1M_1 vs M2M_2)a1b1a2b2a_1 b_1 - a_2 b_2Difference 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 M1M_1 transmits significantly MORE or LESS of the effect than M2M_2:

C12=a1b1a2b2C_{12} = a_1 b_1 - a_2 b_2

A bootstrapped 95% CI for C12C_{12} 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 (C12=0.18C_{12} = 0.18, 95% BCa CI [0.04, 0.35])."

7.2.4 Why Parallel Mediation is Preferred Over Separate Analyses

ReasonExplanation
Controls for mediators simultaneouslyEach bb coefficient controls for the other mediators
Avoids inflated Type I errorOne model rather than multiple separate tests
Enables direct comparisonContrasts between specific indirect effects are possible
More powerfulEstimates 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 XX affects M1M_1, which then affects M2M_2, which then affects YY. This model makes stronger theoretical claims than parallel mediation.

7.3.1 Model Specification (Two Sequential Mediators)

Equation 1:

M1=iM1+a1X+eM1M_1 = i_{M_1} + a_1 X + e_{M_1}

Equation 2:

M2=iM2+a2X+d21M1+eM2M_2 = i_{M_2} + a_2 X + d_{21} M_1 + e_{M_2}

Equation 3:

Y=iY+cX+b1M1+b2M2+eYY = i_Y + c'X + b_1 M_1 + b_2 M_2 + e_Y

Path diagram: a₁ d₂₁ b₂ X ────────→ M₁ ───────→ M₂ ───────→ Y ↘─────────↗ ↘──── a₂ ───────→ M₂ ↘──── a₁b₁ ───────→ Y c'

7.3.2 The Three Indirect Effects

PathFormulaDescription
XM1YX \rightarrow M_1 \rightarrow Ya1b1a_1 b_1Through M1M_1 only, bypassing M2M_2
XM2YX \rightarrow M_2 \rightarrow Ya2b2a_2 b_2Through M2M_2 only, bypassing M1M_1
XM1M2YX \rightarrow M_1 \rightarrow M_2 \rightarrow Ya1d21b2a_1 d_{21} b_2The full serial pathway
Total indirecta1b1+a2b2+a1d21b2a_1 b_1 + a_2 b_2 + a_1 d_{21} b_2All indirect pathways

7.3.3 When to Use Sequential vs. Parallel Mediation

FeatureSequentialParallel
Mediators causally connected (M1M2M_1 \rightarrow M_2)?YesNo
Theoretical justification for chain?RequiredNot required
Tests the full causal process?YesPartially
More complex model?YesSimpler
Requires larger sample?YesLess 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 M1M_1 and M2M_2 is ambiguous, use parallel mediation and add the M1M2M_1 \rightarrow M_2 path as a sensitivity check.

7.3.4 Extending to Three or More Sequential Mediators

With three sequential mediators M1M2M3M_1 \rightarrow M_2 \rightarrow M_3, the model contains five equations and seven indirect effects (one for each possible sub-path combination), including the full chain a1d21d32b3a_1 d_{21} d_{32} b_3.

For kk sequential mediators, the number of indirect effects is 2k12^k - 1.

⚠️ Models with more than two sequential mediators require very large samples (n500n \geq 500) 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 XX and YY depends on the level of a third variable WW (the moderator).

8.1.1 Model Specification

Y=b0+b1X+b2W+b3(X×W)+eY = b_0 + b_1 X + b_2 W + b_3 (X \times W) + e

The hypothesis of moderation is tested by H0:b3=0H_0: b_3 = 0.

A significant b30b_3 \neq 0 indicates that the effect of XX on YY varies as a function of WW.

8.1.2 Interpreting the Interaction Coefficient

The interaction coefficient b3b_3 tells us:

"For each one-unit increase in WW, the effect of XX on YY changes by b3b_3 units."

Or equivalently:

"The conditional effect of XX on YY is b1+b3Wb_1 + b_3 W."

The sign and magnitude of b3b_3 determine the pattern of moderation:

b3b_3PatternVisualisation
Positive, largeStrong positive moderationSteeper slope at high WW
Positive, smallWeak positive moderationSlightly steeper slope at high WW
ZeroNo moderationParallel lines across WW values
Negative, smallWeak negative moderationSlightly flatter slope at high WW
Negative, largeStrong negative moderationReversed/attenuated slope at high WW

8.1.3 Simple Slopes Analysis (Spotlight Analysis)

After finding a significant interaction, compute simple slopes at three values of WW:

Low WW: θ^XY(WL)=b1+b3(MWSDW)\hat{\theta}_{XY}(W_L) = b_1 + b_3(M_W - SD_W)

Mean WW: θ^XY(MW)=b1+b3(MW)\hat{\theta}_{XY}(M_W) = b_1 + b_3(M_W)

High WW: θ^XY(WH)=b1+b3(MW+SDW)\hat{\theta}_{XY}(W_H) = b_1 + b_3(M_W + SD_W)

For each simple slope, compute:

8.1.4 Visualising Moderation

The interaction should always be visualised with an interaction plot (also called a moderation plot or floodlight plot):

Non-parallel lines indicate moderation. Crossing lines indicate that the direction of the XYX \rightarrow Y relationship reverses across values of WW.

8.1.5 Moderator Variable Types

Moderator TypeExampleAnalytical Note
ContinuousAge, income, personality scoreMean-centre before creating interaction
Binary (0/1)Gender, treatment conditionNo centering needed; compare two slopes
MulticategoricalEthnicity (3+ groups)Use dummy coding; one interaction per dummy

For binary moderators: The interaction test compares the simple slope of XX on YY in Group 0 vs. Group 1. The simple slope in Group 0 is b1b_1 (since W=0W = 0); in Group 1 it is b1+b3b_1 + b_3 (since W=1W = 1).


8.2 Multiple Moderation

Multiple moderation tests whether two (or more) moderators W1W_1 and W2W_2 independently moderate the XYX \rightarrow Y relationship in the same model.

8.2.1 Model Specification

Y=b0+b1X+b2W1+b3W2+b4(X×W1)+b5(X×W2)+eY = b_0 + b_1 X + b_2 W_1 + b_3 W_2 + b_4 (X \times W_1) + b_5 (X \times W_2) + e

Where:

The conditional effect of XX on YY given specific values of W1=w1W_1 = w_1 and W2=w2W_2 = w_2:

θ^(w1,w2)=b1+b4w1+b5w2\hat{\theta}(w_1, w_2) = b_1 + b_4 w_1 + b_5 w_2

8.2.2 Interpreting Multiple Moderation Results

Each interaction coefficient (b4b_4 and b5b_5) is interpreted conditional on the other moderator being held at zero (or at its mean, if centred):

Simple slopes are probed at all combinations of W1W_1 and W2W_2 levels (e.g., 3×3=93 \times 3 = 9 combinations for Low/Mean/High values of both moderators).

💡 Multiple moderation models require substantially larger samples than simple moderation (n300n \geq 300 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 WW on the XYX \rightarrow Y relationship is itself moderated by a third variable VV. In other words: does the strength of the interaction between XX and WW depend on VV?

8.3.1 Model Specification

Y=b0+b1X+b2W+b3V+b4(X×W)+b5(X×V)+b6(W×V)+b7(X×W×V)+eY = b_0 + b_1 X + b_2 W + b_3 V + b_4 (X \times W) + b_5 (X \times V) + b_6 (W \times V) + b_7 (X \times W \times V) + e

Where:

The conditional interaction effect (how the X×WX \times W interaction varies with VV):

θ^XW(v)=b4+b7v\hat{\theta}_{XW}(v) = b_4 + b_7 v

The conditional simple slope of XX on YY at specific values of W=wW = w and V=vV = v:

θ^X(w,v)=b1+b4w+b5v+b7wv\hat{\theta}_{X}(w, v) = b_1 + b_4 w + b_5 v + b_7 wv

8.3.2 Probing Three-Way Interactions

To probe a significant three-way interaction (b70b_7 \neq 0):

Step 1: Pick values of VV (e.g., VLowV_{Low}, VMeanV_{Mean}, VHighV_{High}).

Step 2: At each value of VV, compute the two-way interaction between XX and WW:

θ^XW(v)=b4+b7v\hat{\theta}_{XW}(v) = b_4 + b_7 v

Step 3: At each combination of WW and VV values, compute the simple slope of XX:

θ^X(w,v)=b1+b4w+b5v+b7wv\hat{\theta}_X(w, v) = b_1 + b_4 w + b_5 v + b_7 wv

This produces 3×3=93 \times 3 = 9 simple slopes (at Low/Mean/High of both WW and VV), organised into three two-way interaction plots, one for each level of VV.

8.3.3 Visualising Three-Way Interactions

A three-way interaction requires three two-way interaction plots arranged side by side:

The three-way interaction is significant when the pattern of the two-way X×WX \times W 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 (n400n \geq 400 minimum, ideally n600n \geq 600) 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) XX affects YY.

9.1 Moderated Mediation — First-Stage (W Moderates the a-Path)

In first-stage moderated mediation, the moderator WW changes the strength of the XMX \rightarrow M relationship (the a-path). Different levels of WW produce different magnitudes of the effect of XX on MM, which in turn produces different indirect effects.

9.1.1 Model Equations

Equation 1 (a-path moderated by W):

M=iM+a1X+a2W+a3(X×W)+eMM = i_M + a_1 X + a_2 W + a_3 (X \times W) + e_M

Equation 2 (b-path unmoderated):

Y=iY+cX+bM+eYY = i_Y + c'X + bM + e_Y

9.1.2 The Conditional Indirect Effect

The indirect effect varies with WW because the a-path is moderated:

Indirect Effect(w)=(a1+a3w)×b\text{Indirect Effect}(w) = (a_1 + a_3 w) \times b

At specific values of WW:

IE(WLow)=(a1+a3wL)×b\text{IE}(W_{Low}) = (a_1 + a_3 w_L) \times b

IE(WMean)=(a1+a3wM)×b\text{IE}(W_{Mean}) = (a_1 + a_3 w_M) \times b

IE(WHigh)=(a1+a3wH)×b\text{IE}(W_{High}) = (a_1 + a_3 w_H) \times b

9.1.3 Index of Moderated Mediation

The index of moderated mediation (IMM) is the rate at which the indirect effect changes as WW increases by one unit:

IMM=a3×b\text{IMM} = a_3 \times b

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 WW changes the strength of the MYM \rightarrow Y relationship (the b-path). The mechanism by which MM transmits the effect to YY depends on the level of WW.

9.2.1 Model Equations

Equation 1 (a-path unmoderated):

M=iM+aX+eMM = i_M + aX + e_M

Equation 2 (b-path moderated by W):

Y=iY+cX+b1M+b2W+b3(M×W)+eYY = i_Y + c'X + b_1 M + b_2 W + b_3 (M \times W) + e_Y

9.2.2 The Conditional Indirect Effect

The indirect effect varies with WW because the b-path is moderated:

Indirect Effect(w)=a×(b1+b3w)\text{Indirect Effect}(w) = a \times (b_1 + b_3 w)

9.2.3 Index of Moderated Mediation

IMM=a×b3\text{IMM} = a \times b_3

A bootstrapped 95% CI for a×b3a \times b_3 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 WW moderating both the a-path (XMX \rightarrow M) and the b-path (MYM \rightarrow Y) simultaneously.

9.3.1 Model Equations

Equation 1 (a-path moderated by W):

M=iM+a1X+a2W+a3(X×W)+eMM = i_M + a_1 X + a_2 W + a_3 (X \times W) + e_M

Equation 2 (b-path also moderated by W):

Y=iY+cX+b1M+b2W+b3(M×W)+eYY = i_Y + c'X + b_1 M + b_2 W + b_3 (M \times W) + e_Y

9.3.2 The Conditional Indirect Effect

Both the a-path and the b-path are now functions of WW:

Indirect Effect(w)=(a1+a3w)×(b1+b3w)\text{Indirect Effect}(w) = (a_1 + a_3 w) \times (b_1 + b_3 w)

This is a quadratic function of WW — the indirect effect can change non-linearly across values of WW.

Expanding:

IE(w)=a1b1+(a1b3+a3b1)w+a3b3w2\text{IE}(w) = a_1 b_1 + (a_1 b_3 + a_3 b_1)w + a_3 b_3 w^2

9.3.3 Index of Moderated Mediation

Because the indirect effect is quadratic in WW, there is no single IMM. Instead, the conditional indirect effect must be evaluated at multiple values of WW and tested with bootstrapped CIs at each value.

A useful summary is the joint significance of a3a_3 and b3b_3 — 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 WW?", it asks: "does the effect of the interaction X×WX \times W on YY operate through a mediator MM?"

9.4.1 Model Equations

Equation 1 (mediating the interaction):

M=iM+a1X+a2W+a3(X×W)+eMM = i_M + a_1 X + a_2 W + a_3 (X \times W) + e_M

Equation 2:

Y=iY+dM+eYY = i_Y + dM + e_Y

9.4.2 The Indirect Effect of X×WX \times W Through MM

The indirect effect of the interaction on YY through MM is:

Indirect Effect of X×W=a3×d\text{Indirect Effect of } X \times W = a_3 \times d

This answers: "How much of the interaction effect of XX and WW on YY is transmitted through the mediator MM?"

9.4.3 Mediated Moderation vs. Moderated Mediation: An Important Distinction

FeatureModerated MediationMediated Moderation
Primary questionDoes the indirect effect (abab) vary with WW?Does MM explain why X×WX \times W affects YY?
FocusConditional indirect effect of XX on YYMechanism of an interaction effect
CentrepieceThe indirect effectThe interaction (X×WX \times W)
Modern preferenceMore commonly usedLess commonly used
When to useTheory specifies how MM connects XX and YYTheory 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 WW 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):

M1=iM1+a11X+a12W+a13(X×W)+eM1M_1 = i_{M_1} + a_{11} X + a_{12} W + a_{13} (X \times W) + e_{M_1}

Equation 2 (d₂₁-path unmoderated):

M2=iM2+a2X+d21M1+eM2M_2 = i_{M_2} + a_2 X + d_{21} M_1 + e_{M_2}

Equation 3:

Y=iY+cX+b1M1+b2M2+eYY = i_Y + c'X + b_1 M_1 + b_2 M_2 + e_Y

9.5.2 The Conditional Indirect Effects

With WW moderating the first a-path, the three indirect effects become:

PathConditional IEVaries with WW?
XM1YX \rightarrow M_1 \rightarrow Y(a11+a13w)×b1(a_{11} + a_{13}w) \times b_1Yes
XM2YX \rightarrow M_2 \rightarrow Ya2×b2a_2 \times b_2No
XM1M2YX \rightarrow M_1 \rightarrow M_2 \rightarrow Y(a11+a13w)×d21×b2(a_{11} + a_{13}w) \times d_{21} \times b_2Yes

9.5.3 Index of Moderated Mediation

For the path through M1M_1 only: IMM1=a13×b1\text{IMM}_1 = a_{13} \times b_1

For the sequential path: IMMserial=a13×d21×b2\text{IMM}_{serial} = a_{13} \times d_{21} \times b_2

Both indices can be tested with bootstrapped confidence intervals.

9.5.4 Variants of Sequential Moderated Mediation

VariantModerated PathHayes Model
W moderates XM1X \rightarrow M_1 onlyFirst a-pathModel 83
W moderates M1M2M_1 \rightarrow M_2 onlyd-pathModel 84
W moderates M2YM_2 \rightarrow Y onlySecond b-pathModel 85
W moderates XM1X \rightarrow M_1 and M2YM_2 \rightarrow YFirst a and second bModel 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 R2R^2 for Each Equation

Because mediation and moderation analyses consist of multiple regression equations, model fit is evaluated separately for each equation in the model.

R2R^2 for equation predicting MM:

RM2=1SSres,MSStot,MR^2_M = 1 - \frac{SS_{res,M}}{SS_{tot,M}}

R2R^2 for equation predicting YY:

RY2=1SSres,YSStot,YR^2_Y = 1 - \frac{SS_{res,Y}}{SS_{tot,Y}}

Adjusted R2R^2 corrects for the number of predictors:

Radj2=1(1R2)n1nk1R^2_{adj} = 1 - (1 - R^2)\frac{n-1}{n-k-1}

Where kk is the number of predictors in the equation.

10.2 ΔR2\Delta R^2 for the Interaction Term

In moderation analysis, the incremental R2R^2 (ΔR2\Delta R^2) quantifies how much variance the interaction term X×WX \times W adds beyond the main effects of XX and WW:

ΔR2=Rwith interaction2Rwithout interaction2\Delta R^2 = R^2_{\text{with interaction}} - R^2_{\text{without interaction}}

The statistical significance of this increment is tested with an F-test:

F=ΔR2/Δk(1Rfull2)/(nkfull1)F = \frac{\Delta R^2 / \Delta k}{(1 - R^2_{\text{full}}) / (n - k_{full} - 1)}

With Δk=1\Delta k = 1 for a single interaction term.

Interpreting ΔR2\Delta R^2 for interactions:

ΔR2\Delta R^2Interpretation
<0.01< 0.01Negligible interaction
0.010.050.01 - 0.05Small but potentially meaningful
0.050.100.05 - 0.10Moderate interaction
>0.10> 0.10Large interaction

⚠️ Interaction effects in observational data are typically small (ΔR2=0.01\Delta R^2 = 0.01 to 0.030.03). Do not discard a theoretically supported interaction merely because ΔR2\Delta R^2 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 a^×b^\hat{a} \times \hat{b} is a point estimate. A non-zero point estimate alone is insufficient evidence for mediation.

Bootstrapped Confidence Intervals:

CI TypeDescriptionRecommendation
Percentile CISimple quantiles of bootstrap distributionAdequate for most purposes
BCa CIBias-corrected and acceleratedPreferred — corrects for bias and skewness
Normal-theory CIBased on asymptotic normality assumptionNot recommended — assumes normality
Monte Carlo CIBased on parametric sampling from coefficient distributionsGood alternative to bootstrap

Decision rule: If the 95% BCa CI for abab 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:

κ2\kappa^2 (Preacher & Kelley, 2011): The ratio of the indirect effect to the maximum possible indirect effect given the data:

κ2=a×bmax(ab)\kappa^2 = \frac{a \times b}{\text{max}(ab)}

Ranges from 0 to 1. Benchmarks: small = 0.01, medium = 0.09, large = 0.25.

Completely Standardised Indirect Effect (abcsab_{cs}): The indirect effect when all variables are standardised:

abcs=ab×σXσYab_{cs} = ab \times \frac{\sigma_X}{\sigma_Y}

Proportion Mediated (PMPM):

PM=abcPM = \frac{ab}{c} (use with caution; see Section 3.3)

10.5 Effect Sizes for Moderation

f2f^2 (Cohen's effect size for regression):

f2=Rfull2Rreduced21Rfull2=ΔR21Rfull2f^2 = \frac{R^2_{full} - R^2_{reduced}}{1 - R^2_{full}} = \frac{\Delta R^2}{1 - R^2_{full}}

f2f^2Effect Size
0.020.02Small
0.150.15Medium
0.350.35Large

💡 For interactions in observational data, f2=0.005f^2 = 0.005 to 0.020.02 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 XX at a specific value of WW) has:

A simple slope whose 95% CI excludes zero is statistically significant — the effect of XX on YY is significantly different from zero at that value of WW.

10.7 Omnibus Fit Summary

For the full model, report:

StatisticWhat to ReportWhen
RM2R^2_MVariance in MM explained by modelAll mediation models
RY2R^2_YVariance in YY explained by modelAll models
F(df1,df2)F(df_1, df_2), ppOverall model significanceAll models
b3b_3 (interaction)Interaction coefficient, SE, tt, ppAll moderation models
ΔR2\Delta R^2Increment from interactionAll moderation models
abab (indirect)Indirect effect with BCa CIAll mediation models
IMM\text{IMM}Index of moderated mediation with BCa CIAll conditional process models
f2f^2Effect size for interactionModeration and conditional process
κ2\kappa^2Effect size for indirect effectMediation

11. Advanced Topics

11.1 Multicategorical Predictors in Mediation and Moderation

When XX is a multicategorical variable with gg groups, it must be represented by g1g - 1 dummy variables (or Helmert/effects codes). For a 3-group predictor (XX: Control, Treatment A, Treatment B) with Control as the reference:

D1=1D_1 = 1 if Treatment A, 0 otherwise

D2=1D_2 = 1 if Treatment B, 0 otherwise

In mediation: Separate a-paths (a1a_1, a2a_2) and a single b-path are estimated. The indirect effect for Treatment A vs. Control is a1×ba_1 \times b; for Treatment B vs. Control it is a2×ba_2 \times b.

In moderation: Separate interaction terms are formed: D1×WD_1 \times W and D2×WD_2 \times W. 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 CC) can be added to any equation in the model. Their role is to adjust for confounders and increase precision.

In mediation with covariates:

M=iM+aX+g1C+eMM = i_M + aX + g_1 C + e_M

Y=iY+cX+bM+g2C+eYY = i_Y + c'X + bM + g_2 C + e_Y

The indirect effect abab now represents the effect of XX on YY through MM, controlling for CC. The covariate CC can have different coefficients in the two equations (g1g2g_1 \neq g_2).

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., XX at Time 1, MM at Time 2, YY at Time 3), several approaches are available:

Simple longitudinal mediation: Use the same model structure but with temporally ordered variables. The indirect effect aT1T2×bT2T3a_{T1T2} \times b_{T2T3} is more interpretable causally.

Cross-Lagged Panel Model (CLPM): Simultaneously models the cross-lagged effects (XT1X_{T1} predicting MT2M_{T2}, MT1M_{T1} predicting YT2Y_{T2}, etc.) and autoregressive effects (XT1X_{T1} predicting XT2X_{T2}, 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 MYM \rightarrow Y relationship (bb-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 ρ\rho is the correlation between the residuals of the mediator and outcome equations:

ρ=Cor(eM,eY)\rho = \text{Cor}(e_M, e_Y)

If ρ=0\rho = 0, there is no unmeasured confounding of the MYM \rightarrow Y relationship. The sensitivity analysis plots the indirect effect against ρ\rho and identifies the critical value ρ\rho^* at which the indirect effect becomes zero. A large ρ|\rho^*| indicates robustness to confounding; a small ρ|\rho^*| indicates fragility.

11.5 Power Analysis for Mediation and Moderation

Power for mediation (Monte Carlo approach):

For a given aa, bb, SEaSE_a, SEbSE_b, and nn, power is the proportion of simulated datasets in which the bootstrapped CI for abab excludes zero:

  1. Simulate S=1,000S = 1{,}000 datasets of size nn from the model with coefficients aa and bb.
  2. In each simulated dataset, compute the bootstrap CI for abab.
  3. Power = proportion of CIs that exclude zero.

Power for moderation (analytical approach):

Given target f2f^2, desired power (typically 0.80), and α\alpha (typically 0.05), use Cohen's power formula:

n=Lf2+k+1n = \frac{L}{f^2} + k + 1

Where LL is obtained from power tables for the F-distribution and kk is the number of predictors. In G*Power: use "F-test: Linear Multiple Regression — Fixed model, R2R^2 deviation from zero" with ΔR2=f2/(1+f2)\Delta R^2 = f^2 / (1 + f^2).

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:

For Moderation:

For Conditional Process:


12. Worked Examples

Example 1: Simple Mediation — Stress, Rumination, and Depression

A researcher hypothesises that the effect of perceived stress (XX) on depression (YY) is mediated by rumination (MM) — a pattern of repetitively thinking about one's distress.

Sample: n=300n = 300 adults. Estimator: OLS with BCa bootstrapping (B=10,000B = 10{,}000). Variables: All measured on validated scales; all continuous.

Model equations:

Equation 1 (predicting rumination from stress):

M^=8.42+0.62X\hat{M} = 8.42 + 0.62X

a=0.62,  SE=0.07,  t(298)=8.86,  p<.001a = 0.62, \; SE = 0.07, \; t(298) = 8.86, \; p < .001

Equation 2 (predicting depression from stress and rumination):

Y^=3.15+0.19X+0.54M\hat{Y} = 3.15 + 0.19X + 0.54M

c=0.19,  SE=0.08,  t(297)=2.38,  p=.018c' = 0.19, \; SE = 0.08, \; t(297) = 2.38, \; p = .018

b=0.54,  SE=0.06,  t(297)=9.00,  p<.001b = 0.54, \; SE = 0.06, \; t(297) = 9.00, \; p < .001

Total effect equation:

Y^=7.70+0.52X\hat{Y} = 7.70 + 0.52X

c=0.52,  SE=0.07,  t(298)=7.43,  p<.001c = 0.52, \; SE = 0.07, \; t(298) = 7.43, \; p < .001

Effects Decomposition:

EffectEstimateSE95% BCa CISignificant?
Total effect (cc)0.5200.070[0.382, 0.658]Yes
Direct effect (cc')0.1900.080[0.033, 0.347]Yes
Indirect effect (abab)0.335[0.215, 0.465]Yes
Proportion mediated64.4%

Verification: c+ab=0.190+0.335=0.525c=0.520c' + ab = 0.190 + 0.335 = 0.525 \approx c = 0.520 ✅ (rounding)

Effect Size: κ2=0.28\kappa^2 = 0.28 — large indirect effect.

Interpretation: The indirect effect of stress on depression through rumination is ab=0.335ab = 0.335 (95% BCa CI [0.215, 0.465]), indicating that rumination significantly mediates the stress-depression relationship. This is partial mediation — both the indirect effect (ab=0.335ab = 0.335, CI excludes zero) and the direct effect (c=0.190c' = 0.190, p=.018p = .018) are statistically significant. Approximately 64% of the total effect of stress on depression (c=0.520c = 0.520) is transmitted through rumination. Each one-unit increase in perceived stress is associated with a 0.62-unit increase in rumination (a=0.62a = 0.62), which in turn is associated with a 0.54-unit increase in depression controlling for stress (b=0.54b = 0.54), yielding a total indirect effect of 0.62×0.54=0.3350.62 \times 0.54 = 0.335 points on the depression scale.


Example 2: Parallel Multiple Mediation — Training, Motivation, Self-Efficacy, and Performance

A management researcher hypothesises that training (XX) improves job performance (YY) through two parallel mechanisms: intrinsic motivation (M1M_1) and self-efficacy (M2M_2).

Sample: n=320n = 320 employees. Method: BCa bootstrap, B=10,000B = 10{,}000.

Model equations:

M^1=2.10+0.48X\hat{M}_1 = 2.10 + 0.48Xa1=0.48a_1 = 0.48, SE=0.09SE = 0.09, p<.001p < .001

M^2=3.25+0.61X\hat{M}_2 = 3.25 + 0.61Xa2=0.61a_2 = 0.61, SE=0.08SE = 0.08, p<.001p < .001

Y^=1.82+0.22X+0.39M1+0.31M2\hat{Y} = 1.82 + 0.22X + 0.39M_1 + 0.31M_2

c=0.22c' = 0.22, SE=0.11SE = 0.11, p=.046p = .046

b1=0.39b_1 = 0.39, SE=0.08SE = 0.08, p<.001p < .001 (motivation → performance)

b2=0.31b_2 = 0.31, SE=0.07SE = 0.07, p<.001p < .001 (self-efficacy → performance)

Total effect: c=0.22+(0.48×0.39)+(0.61×0.31)=0.22+0.187+0.189=0.596c = 0.22 + (0.48 \times 0.39) + (0.61 \times 0.31) = 0.22 + 0.187 + 0.189 = 0.596

Specific Indirect Effects:

PathIE95% BCa CISignificant?
Training → Motivation → Performance0.48×0.39=0.1870.48 \times 0.39 = 0.187[0.086, 0.311]Yes
Training → Self-Efficacy → Performance0.61×0.31=0.1890.61 \times 0.31 = 0.189[0.091, 0.308]Yes
Total indirect0.3760.376[0.201, 0.551]Yes
Direct effect (cc')0.2200.220[0.004, 0.436]Yes
Contrast (M1M_1 vs. M2M_2)0.1870.189=0.0020.187 - 0.189 = -0.002[-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 (XX) on burnout (YY) is weaker when social support (WW) is high. All variables are mean-centred.

Sample: n=280n = 280 nurses. Method: OLS regression.

Model:

Y=b0+b1Xc+b2Wc+b3(Xc×Wc)+eY = b_0 + b_1 X_c + b_2 W_c + b_3 (X_c \times W_c) + e

Results:

TermbbSEttpp95% CI
Constant3.820.0847.75<.001<.001[3.66, 3.98]
Work Demands (b1b_1)0.580.096.44<.001<.001[0.400, 0.760]
Social Support (b2b_2)-0.310.08-3.88<.001<.001[-0.468, -0.152]
Work Demands × Social Support (b3b_3)-0.190.06-3.17.002.002[-0.308, -0.072]

R2=.428R^2 = .428, F(3,276)=68.75F(3, 276) = 68.75, p<.001p < .001

ΔR2=.041\Delta R^2 = .041 for interaction, F(1,276)=10.05F(1, 276) = 10.05, p=.002p = .002, f2=.072f^2 = .072 (moderate)

Simple Slopes (Spotlight Analysis):

Values of WW: WLow=0.85W_{Low} = -0.85 (−1SD), WMean=0W_{Mean} = 0, WHigh=+0.85W_{High} = +0.85 (+1SD)

θ^(w)=0.58+(0.19)×w\hat{\theta}(w) = 0.58 + (-0.19) \times w

WW LevelwwSimple SlopeSEttpp95% CI
Low (1-1SD)0.85-0.850.58+(0.19)(0.85)=0.7410.58 + (-0.19)(-0.85) = 0.7410.1216.12<.001<.001[0.503, 0.979]
Mean0.000.000.58+(0.19)(0.00)=0.5800.58 + (-0.19)(0.00) = 0.5800.0906.44<.001<.001[0.400, 0.760]
High (+1+1SD)+0.85+0.850.58+(0.19)(0.85)=0.4190.58 + (-0.19)(0.85) = 0.4190.1123.74<.001<.001[0.199, 0.639]

Johnson-Neyman Analysis:

The effect of work demands on burnout is statistically significant (p<.05p < .05) across the entire observed range of social support. However, the effect is significantly smaller at high social support (θ=0.419\theta = 0.419) than at low social support (θ=0.741\theta = 0.741).

Interaction Plot:

Work demands effects on burnout:

Interpretation: There is a significant negative interaction between work demands and social support on burnout (b3=0.19b_3 = -0.19, p=.002p = .002, ΔR2=.041\Delta R^2 = .041). 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 (p<.001p < .001) but only 0.419 at high social support (p<.001p < .001). 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 (WW) moderates the first stage of the mediated process by which exercise (XX) affects wellbeing (YY) through self-efficacy (MM). 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: n=400n = 400 adults (ages 18–70). Method: BCa bootstrap, B=10,000B = 10{,}000. All continuous predictors mean-centred.

Equation 1 (a-path moderated by Age):

M^=42.15+0.61Xc+(0.18)Wc+(0.24)(Xc×Wc)\hat{M} = 42.15 + 0.61X_c + (-0.18)W_c + (-0.24)(X_c \times W_c)

a1=0.61a_1 = 0.61, SE=0.09SE = 0.09, p<.001p < .001 (effect of exercise on self-efficacy at mean age)

a2=0.18a_2 = -0.18, SE=0.07SE = 0.07, p=.011p = .011 (effect of age on self-efficacy)

a3=0.24a_3 = -0.24, SE=0.08SE = 0.08, p=.003p = .003 (interaction: exercise × age on self-efficacy)

Equation 2 (b-path unmoderated):

Y^=58.32+0.18Xc+0.43M\hat{Y} = 58.32 + 0.18X_c + 0.43M

b=0.43b = 0.43, SE=0.07SE = 0.07, p<.001p < .001; c=0.18c' = 0.18, SE=0.10SE = 0.10, p=.072p = .072

Conditional Indirect Effects:

IE(w)=(a1+a3w)×b=(0.610.24w)×0.43\text{IE}(w) = (a_1 + a_3 w) \times b = (0.61 - 0.24w) \times 0.43

Values of WW (Age): WLow=10.5W_{Low} = -10.5 years (−1SD); WMean=0W_{Mean} = 0; WHigh=+10.5W_{High} = +10.5 years (+1SD)

Age LevelwwConditional a-pathIE(w)=(0.610.24w)×0.43\text{IE}(w) = (0.61 - 0.24w) \times 0.4395% BCa CISignificant?
Young (1-1SD)10.5-10.50.61+2.52=3.130.61 + 2.52 = 3.133.13×0.43=1.3463.13 \times 0.43 = 1.346[0.842, 1.887]Yes
Mean Age000.610.610.61×0.43=0.2620.61 \times 0.43 = 0.262[0.108, 0.435]Yes
Older (+1+1SD)+10.5+10.50.612.52=1.910.61 - 2.52 = -1.911.91×0.43=0.821-1.91 \times 0.43 = -0.821[-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:

IMM=a3×b=0.24×0.43=0.103\text{IMM} = a_3 \times b = -0.24 \times 0.43 = -0.103

95% BCa CI for IMM: [0.178,0.036][-0.178, -0.036] → 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 (1SD-1\text{SD} 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 (+1SD+1\text{SD} 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 (WW) moderates the second stage (b-path) of the process by which transformational leadership (XX) improves team performance (YY) through team trust (MM). Trust may translate into performance more effectively in high- autonomy environments.

Sample: n=350n = 350 teams. Method: BCa bootstrap, B=10,000B = 10{,}000.

Equation 1 (a-path unmoderated):

M^=2.85+0.52Xc\hat{M} = 2.85 + 0.52X_ca=0.52a = 0.52, SE=0.08SE = 0.08, p<.001p < .001

Equation 2 (b-path moderated by Autonomy):

Y^=3.42+0.15Xc+0.38Mc+0.22Wc+0.29(Mc×Wc)\hat{Y} = 3.42 + 0.15X_c + 0.38M_c + 0.22W_c + 0.29(M_c \times W_c)

b1=0.38b_1 = 0.38, b3=0.29b_3 = 0.29, SEb3=0.09SE_{b_3} = 0.09, p=.001p = .001

Conditional Indirect Effects:

IE(w)=a×(b1+b3w)=0.52×(0.38+0.29w)\text{IE}(w) = a \times (b_1 + b_3 w) = 0.52 \times (0.38 + 0.29w)

Autonomy LevelwwConditional b-pathIE(w)\text{IE}(w)95% BCa CISignificant?
Low (1-1SD)0.82-0.820.38+(0.29)(0.82)=0.1420.38 + (0.29)(-0.82) = 0.1420.52×0.142=0.0740.52 \times 0.142 = 0.074[-0.038, 0.193]No
Mean000.380.380.52×0.38=0.1980.52 \times 0.38 = 0.198[0.087, 0.325]Yes
High (+1+1SD)+0.82+0.820.38+(0.29)(0.82)=0.6180.38 + (0.29)(0.82) = 0.6180.52×0.618=0.3210.52 \times 0.618 = 0.321[0.181, 0.476]Yes

Index of Moderated Mediation:

IMM=a×b3=0.52×0.29=0.151\text{IMM} = a \times b_3 = 0.52 \times 0.29 = 0.151

95% BCa CI for IMM: [0.063,0.253][0.063, 0.253] → 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 XX to significantly predict YY before testing mediation. This is incorrect — a significant indirect effect can exist even when the total effect cc 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 abab is normal.
Solution: Use the modern approach: bootstrap the indirect effect and construct a 95% BCa CI. Test mediation by whether the CI for abab excludes zero — regardless of the significance of cc.

Mistake 2: Claiming Causal Mediation from Cross-Sectional Data

Problem: Mediation analysis uses causal language ("XX affects YY through MM") 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 XX caused MM before MM caused YY.
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 XX and/or MM.

Mistake 3: Not Mean-Centering Before Computing the Interaction Term

Problem: Using raw (uncentred) scores to compute the interaction term X×WX \times W often produces severe multicollinearity — VIFs for XX, WW, and X×WX \times W can exceed 30–50. This inflates standard errors and makes the main effects (b1b_1 and b2b_2) uninterpretable (they represent the effect at X=0X = 0 and W=0W = 0, 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 b3b_3.

Mistake 4: Interpreting the Main Effect of X as the "Effect of X" in a Moderation Model

Problem: In a moderation model Y=b0+b1X+b2W+b3(X×W)Y = b_0 + b_1 X + b_2 W + b_3 (X \times W), b1b_1 is NOT the overall effect of XX on YY. It is the conditional effect of XX when W=0W = 0 (or at the mean of WW if centred). Reporting b1b_1 as the "main effect of XX" 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 WW rather than interpreting b1b_1 in isolation. Only report b1b_1 as "the effect of XX at the mean of WW" (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 b3b_3 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 WW; (b) create and include an interaction plot; (c) describe in plain language what the interaction means (e.g., "the effect of XX on YY was stronger/weaker/reversed when WW was high").

Mistake 7: Concluding Partial vs. Full Mediation Based on cc' Significance

Problem: Classifying mediation as "partial" (cc' significant) or "full" (cc' 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 cc' depends on sample size, not on the theoretical importance of the direct path.
Solution: Report and interpret the magnitude of abab relative to cc (proportion mediated or κ2\kappa^2). 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 B=5,000B = 5{,}000 bootstrap samples for exploratory work and B=10,000B = 10{,}000 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 (M1M2M_1 \rightarrow M_2 vs. M2M1M_2 \rightarrow M_1) 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 WW (e.g., "the indirect effect was significant at high WW but not at low WW"), without testing whether the indirect effect is significantly moderated overall. Differences in significance at different values of WW 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 (IMM=a3b\text{IMM} = a_3 b or IMM=ab3\text{IMM} = a b_3) with its bootstrapped 95% CI. A CI that excludes zero is the primary test that the indirect effect is significantly moderated by WW.


14. Troubleshooting

ProblemLikely CauseSolution
Indirect effect CI is very wideSmall sample; weak aa or bb path; high variabilityIncrease sample size; use standardised variables; check for outliers
Indirect effect is non-zero but CI includes zeroInsufficient power; inconsistent mediationIncrease nn; increase BB (bootstrap samples); check for sign changes in paths
a+b+ca + b + c' do not sum to cc (large discrepancy)Rounding error; mediators correlated; computational errorVerify variable coding; use unstandardised coefficients; recheck calculations
VIF >10> 10 for XX, WW, or X×WX \times WPredictors not centred; extreme multicollinearityMean-centre all continuous predictors and moderators before computing interactions
Interaction non-significant despite theoretical predictionInsufficient power for small f2f^2; wrong functional form; wrong moderatorConduct a priori power analysis; check for non-linear interaction; try alternative moderators
Simple slopes all in same direction despite significant interactionThe interaction changes magnitude but not directionReport the magnitude change; use Johnson-Neyman to find where effect size changes meaningfully
Proportion mediated exceeds 1.0 or is negativeInconsistent mediation (cc' and abab have opposite signs); total effect near zeroDo not interpret proportion mediated in this case; report only abab and cc' separately
Bootstrapped CI is asymmetric around point estimateSkewed bootstrap distribution; small nn; near-zero pathsExpected and acceptable; BCa CI handles this; do not report Sobel-based symmetric CI
RM2R^2_M is very small (<0.05< 0.05)XX is a weak predictor of MM; a-path is trivially smallCheck whether MM is the correct mediator; assess aa and bb path magnitudes separately
Model equations fail to convergePerfect multicollinearity; sample too small for model complexityReduce predictors; mean-centre; simplify model; collect more data
All simple slopes significant at all values of WWVery strong main effect dominates interactionInteraction may still be meaningful; report magnitude changes using Johnson-Neyman
Sequential mediation indirect effects do not sum correctlyError in path specification; correlations among mediators not accounted forCheck that the model equation for M2M_2 includes M1M_1 as a predictor
IMM (index of moderated mediation) CI includes zero despite conditional IEs varyingConditional IEs may differ descriptively but not statisticallyIMM is the correct test; do not claim significant moderated mediation without IMM CI excluding zero
Bootstrap results differ substantially across runsToo few bootstrap samples; seed not setIncrease BB to 10,000; set a fixed random seed for reproducibility

15. Quick Reference Cheat Sheet

Core Equations

FormulaDescription
M=iM+aX+eMM = i_M + aX + e_MPath a equation (simple mediation)
Y=iY+cX+bM+eYY = i_Y + c'X + bM + e_YPath b and c' equation (simple mediation)
IE=a×b\text{IE} = a \times bIndirect effect
c=c+abc = c' + abTotal effect identity
PM=ab/cPM = ab/cProportion mediated (use with caution)
SEM=σX1R2\text{SEM} = \sigma_X\sqrt{1 - R^2}Standard error of the indirect effect (Sobel)
Y=b0+b1X+b2W+b3(X×W)+eY = b_0 + b_1X + b_2W + b_3(X \times W) + eSimple moderation model
θ^XY(w)=b1+b3w\hat{\theta}_{XY}(w) = b_1 + b_3 wConditional effect of XX at W=wW = w
SE[θ^(w)]=Var^(b1)+2wCov^(b1,b3)+w2Var^(b3)SE[\hat{\theta}(w)] = \sqrt{\widehat{Var}(b_1) + 2w\widehat{Cov}(b_1,b_3) + w^2\widehat{Var}(b_3)}SE of simple slope
IE(w)=(a1+a3w)×b\text{IE}(w) = (a_1 + a_3 w) \times bConditional IE (first-stage moderation)
IE(w)=a×(b1+b3w)\text{IE}(w) = a \times (b_1 + b_3 w)Conditional IE (second-stage moderation)
IE(w)=(a1+a3w)(b1+b3w)\text{IE}(w) = (a_1 + a_3 w)(b_1 + b_3 w)Conditional IE (both-stage moderation)
IMM=a3×b\text{IMM} = a_3 \times bIndex of moderated mediation (first-stage)
IMM=a×b3\text{IMM} = a \times b_3Index of moderated mediation (second-stage)
ΔR2=Rfull2Rreduced2\Delta R^2 = R^2_{full} - R^2_{reduced}Incremental R2R^2 for interaction
f2=ΔR2/(1Rfull2)f^2 = \Delta R^2 / (1 - R^2_{full})Cohen's f2f^2 for interaction

Model Selection Guide

Research QuestionAppropriate Model
How does XX affect YY? (one mediator)Simple Mediation
Does XX affect YY through multiple mechanisms?Parallel Multiple Mediation
Is there a causal chain XM1M2YX \rightarrow M_1 \rightarrow M_2 \rightarrow Y?Sequential Mediation
When/for whom does XX affect YY? (one moderator)Simple Moderation
Do two moderators jointly change the XYX \rightarrow Y effect?Multiple Moderation
Does the moderation of XYX \rightarrow Y vary with a third variable?Moderated Moderation (Three-Way)
Does the indirect effect (abab) depend on level of WW? (W on a-path)First-Stage Moderated Mediation
Does the indirect effect (abab) depend on level of WW? (W on b-path)Second-Stage Moderated Mediation
Does WW simultaneously moderate both aa and bb paths?Both-Stage Moderated Mediation
Why does the X×WX \times W interaction on YY exist?Mediated Moderation
Does WW moderate a path in a XM1M2YX \rightarrow M_1 \rightarrow M_2 \rightarrow Y chain?Sequential Moderated Mediation

Mediation Effect Interpretation

ComponentSymbolInterpretation
a-pathaaEffect of XX on MM
b-pathbbEffect of MM on YY, controlling for XX
Direct effectcc'Effect of XX on YY, controlling for MM
Total effectccEffect of XX on YY without MM in model
Indirect effectababEffect of XX on YY transmitted through MM
Proportion mediatedab/cab/cFraction of total effect through MM

Moderation Effect Interpretation

PatternSign of b3b_3Interpretation
Enhancing moderation++High WW strengthens XYX \rightarrow Y
Buffering moderation-High WW weakens XYX \rightarrow Y
Crossover interaction±\pm (changes sign)High WW reverses direction of XYX \rightarrow Y
No moderation0\approx 0Effect of XX on YY is constant across WW

Key Decision Rules

Decision PointRule
Is mediation significant?95% BCa CI for abab excludes zero
Is moderation significant?b30b_3 \neq 0, p<.05p < .05, ΔR2>0\Delta R^2 > 0
Is conditional process significant?95% BCa CI for IMM excludes zero
Is simple slope significant at value ww?95% CI for θ^(w)\hat{\theta}(w) excludes zero
Should I use Baron-Kenny?No — always use bootstrapped indirect effects
Full vs. partial mediation?Avoid classification; report abab magnitude and cc' effect size

Effect Size Benchmarks

StatisticSmallMediumLarge
κ2\kappa^2 (indirect effect)0.010.090.25
f2f^2 (interaction)0.020.150.35
ΔR2\Delta R^2 (interaction, observational)0.010.050.10
abcsab_{cs} (standardised indirect)0.010.060.14

Minimum Sample Size Guidelines

ModelMinimum nnRecommended nn
Simple mediation100200\geq 200
Parallel mediation (2 mediators)150300\geq 300
Sequential mediation (2 mediators)200400\geq 400
Simple moderation100200\geq 200
Multiple moderation200300\geq 300
Three-way (moderated moderation)300500\geq 500
Moderated mediation (one stage)200400\geq 400
Both-stage moderated mediation300500\geq 500
Sequential moderated mediation350600\geq 600

Bootstrap Confidence Interval Recommendations

SituationMethodB
Exploratory / pilot researchPercentile CI5,000
Published research (standard)BCa CI10,000
Very skewed distributionBCa CI10,000
Robustness checkMonte Carlo CI20,000
Near-zero indirect effectBCa CI10,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.