Skip to contents

Purpose: definitions and equations for P (parallel mediation). For a first analysis, start with Choose an analysis or Get started. GenerateModelP() creates the model syntax used for this structure.

There are no directed connections among mediators.

parallel within-subject mediation model

Difference scores and centered averages

For mediator ii, Mi1M_{i1} and Mi2M_{i2} are its measurements in conditions 1 and 2. Define

Mdiff,i=Mi2−Mi1,M̃avg,i=Mi1+Mi22,Mavg,i=M̃avg,i−M̃¯avg,i. M_{\mathrm{diff},i}=M_{i2}-M_{i1},\qquad \widetilde M_{\mathrm{avg},i}=\frac{M_{i1}+M_{i2}}{2},\qquad M_{\mathrm{avg},i}=\widetilde M_{\mathrm{avg},i}-\overline{\widetilde M}_{\mathrm{avg},i}.

The bar denotes the sample mean used for centering. The outcome difference is Ydiff=Y2−Y1Y_{\mathrm{diff}}=Y_2-Y_1. PrepareData() constructs these variables: diff is not centered, whereas avg is centered.

Regression equations

The equations below show the regression part of the model without covariates or an external moderator. All NN mediators predict the outcome difference:

Ydiff=c′+∑i=1N(biMdiff,i+diMavg,i)+e. Y_{\mathrm{diff}}=c'+\sum_{i=1}^{N}\left(b_iM_{\mathrm{diff},i}+d_iM_{\mathrm{avg},i}\right)+e.

The mediator equations determine the structure:

Mdiff,i=ai+ϵi,i=1,…,N. M_{\mathrm{diff},i}=a_i+\epsilon_i,\qquad i=1,\ldots,N.

The intercepts aia_i and c′c' represent direct condition effects in their respective equations; the model syntax labels c′c' as cp. Each bib_i is the coefficient of a mediator difference, and did_i is the coefficient of its centered average. For a mediator-to-mediator connection, bjib_{ji} and djid_{ji} are the corresponding coefficients from mediator jj to mediator ii (syntax labels b_j_i and d_j_i).

The dd coefficients capture differences between condition-specific slopes. The average component is not itself an external moderator. Moderation by a separate variable WW requires specifying W and MP.

Relation to the two condition equations

Write the condition-specific outcome regressions as

Y1=g01+∑igi1Mi1+e1,Y2=g02+∑igi2Mi2+e2. Y_1=g_{01}+\sum_i g_{i1}M_{i1}+e_1,\qquad Y_2=g_{02}+\sum_i g_{i2}M_{i2}+e_2.

Subtracting the first equation from the second gives bi=(gi1+gi2)/2b_i=(g_{i1}+g_{i2})/2 and di=gi2−gi1d_i=g_{i2}-g_{i1}. After centering the averages, the intercept is

c′=g02−g01+∑idiM̃¯avg,i. c'=g_{02}-g_{01}+\sum_i d_i\overline{\widetilde M}_{\mathrm{avg},i}.

Thus centering the averages changes the intercept, while preserving the difference and average slopes.

Indirect pathways

Every mediator has a single-mediator indirect pathway IEi=aibiIE_i=a_i b_i. A longer directed pathway is the product of its starting aa coefficient, its mediator-to-mediator bb coefficients and its final outcome bb coefficient. The centered-average dd coefficients remain in the fitted regressions but do not enter these indirect-effect products.

For three mediators, the complete set is:

Mediator route to Y Indirect effect Result identifier
M1 → Y a1b1a_1 b_1 indirect_1
M2 → Y a2b2a_2 b_2 indirect_2
M3 → Y a3b3a_3 b_3 indirect_3

Total effects and contrasts

Sum every complete indirect pathway to obtain the total indirect effect:

IEtotal=∑p∈𝒫IEp,TE=c′+IEtotal. IE_{\mathrm{total}}=\sum_{p\in\mathcal P}IE_p,\qquad TE=c'+IE_{\mathrm{total}}.

Here 𝒫\mathcal P is the set of directed condition-to-outcome pathways through one or more mediators. To compare two such pathways, define a signed contrast:

Δp,q=IEp−IEq. \Delta_{p,q}=IE_p-IE_q.

A positive contrast means that the first indirect effect is numerically larger; it does not necessarily have a larger absolute magnitude. For example, −0.1−(−0.3)=0.2-0.1-(-0.3)=0.2, although |−0.1|<|−0.3||-0.1|<|-0.3|. A contrast estimate alone does not establish a difference. Compute its CI from the difference of the effects within each matched joint draw, using wsmed_contrasts(); do not subtract the endpoints of two separate CIs. See Read and export results.

Condition-specific slopes

On the unstandardized scale, the outcome slopes in conditions 1 and 2 are

gi1=bi−di/2,gi2=bi+di/2. g_{i1}=b_i-d_i/2,\qquad g_{i2}=b_i+d_i/2.

The same relation applies to each included mediator-to-mediator connection, using bjib_{ji} and djid_{ji}. These are path coefficients, not additional indirect effects.

Standardization and moderation

GenerateModel*() constructs unstandardized model syntax. With a fitted wsMed result, use summary(result, standardized = TRUE) to request standardized effects and paths, or set standardized = TRUE in wsMed() to make that scale the reporting default.

Let sDMis_{D M_i}, sAMis_{A M_i} and sDYs_{D Y} be the marginal model-implied SDs of the mediator differences, centered averages and outcome difference. Then

ai*=ai/sDMi,bi*=bisDMi/sDY,di*=disAMi/sDY,c′*=c′/sDY. a_i^*=a_i/s_{D M_i},\quad b_i^*=b_i s_{D M_i}/s_{D Y},\quad d_i^*=d_i s_{A M_i}/s_{D Y},\quad c'^*=c'/s_{D Y}.

Mediator-to-mediator slopes use the corresponding source and destination SDs. Intermediate scales cancel in each complete indirect-effect product, giving IEp*=IEp/sDYIE_p^*=IE_p/s_{D Y}. With moderation, evaluate the conditional paths first: IEp*(w)=IEp(w)/sDYIE_p^*(w)=IE_p(w)/s_{D Y}. All moderator values or groups share the same marginal endpoint scale. Continuous moderator probes retain their raw units.

Standardized CIs transform coefficients and scales jointly in each draw. Do not divide raw CI endpoints by a single fitted SD, or reconstruct condition-specific slopes as bi*±di*/2b_i^*\pm d_i^*/2: the two standardized coefficients use different predictor scales. See Standardized effects for conditional effects, interaction coefficients and inference.