What the method does
A mediation model specifies how a predictor relates to an outcome through one or more mediators. A moderation model includes an interaction so that a predictor’s relationship with an outcome depends on a moderator. These are different research questions. The model, time ordering and study design determine whether the relationships can support a causal interpretation.
Simple linear mediation: indirect effect = ab. Moderation: slope of X = b₁ + b₃W.
a is the X-to-mediator path and b the mediator-to-outcome path in a linear additive mediation model. In the moderation expression, b₃ is the interaction coefficient and W the moderator value. Use uncertainty for the indirect effect or conditional slope itself.
Data and analysis in QuickPLS
Use case-level variables or an eligible measurement model, with the predictor, mediator or moderator and outcome roles defined before estimation.
QuickPLS provides mediation and moderation workflows for observed variables and structural models. Choose the route that matches how your variables are measured, then follow its data and inference requirements.
Follow a worked example
The following example shows the data, settings and decisions for one analysis. Use the linked practice files to follow it. For your own study, keep the procedure and choose the variables, model and settings that fit your research question.
Download observed-workshop.csv to begin. It contains 120 rows and 8 columns. The example below identifies the variables to use, their roles and any rows to exclude; not every column is an analysis variable.
Through what pathway, or under which conditions?
Imagine a study of training and job performance. Mediation asks whether training is related to performance through an intermediate response, such as confidence. That intermediate variable is called a mediator. Moderation asks whether the training-performance relationship is different at different levels of another variable, such as prior experience. That variable is called a moderator.
A model can contain both questions. Name the pathway and the relationship you expect to change before choosing a calculation. Drawing training → confidence → performance does not establish the order in which events happened. An indirect association can also reflect unmeasured common causes, which are variables that influence more than one part of the pathway. A statistical result alone cannot prove the proposed mechanism.

Follow the whole indirect path
Use X for the starting variable, M for the mediator and Y for the outcome. In a simple linear model without interaction, the indirect coefficient for X → M → Y is the X-to-M coefficient multiplied by the M-to-Y coefficient. Both must come from the same defined model and analysis sample. More mediators, interactions or nonlinear outcomes can change how the effect must be defined.
The direct coefficient describes X in the outcome equation alongside M and the chosen controls. A specific indirect effect follows one named pathway. A total indirect effect adds the relevant specific pathways; a total effect combines the direct and indirect parts under the model's definition. Read the path named on each output row rather than treating all of these quantities as the same result.
Read the relationship at meaningful moderator values
An interaction lets a relationship change with a moderator. For example, the association between training and confidence might be stronger among people with less prior experience. A conditional effect, also called a simple slope, describes that relationship at a stated experience value.
Read the interaction together with its main effects: the individual predictor and moderator terms retained in the equation. Also check their scales. A significant interaction does not tell you which conditions produce a positive, negative or practically useful relationship. Inspect conditional effects at values supported by the data, and report those values explicitly.
Choose the route that matches how your variables are measured
If x, m and y are directly recorded numeric columns, use the observed-variable Regression / PROCESS-style route for the exercise below. If concepts are represented by several indicators in a PLS model, use the matching PLS calculation. Construct scores and measurement-error treatment can change the quantities being estimated; a similar-looking diagram does not make the results interchangeable.
CB-SEM means covariance-based structural equation modelling. Its latent-factor interaction routes use different measurement and fitting assumptions from the observed-variable exercise. Interventional Mediation asks a causal question about changing treatment and needs an explicit intervention and identification argument. The table helps you find the appropriate guide.
On a small screen, swipe the table sideways to see every column.
| Specification | Guide | Distinction |
|---|---|---|
| PLS indirect and interaction models | PLS-SEM and Conditional Process | Specified PLS paths with the inference available for that model. |
| Observed-variable mediation/moderation | Regression / PROCESS-style paths | Observed variables rather than latent measurement. |
| Latent-by-observed CB-SEM interaction | CB-SEM Moderator Analysis | Conditional-likelihood estimation with an observed moderator. |
| Factor-by-factor interaction | CB-SEM Product-Indicator Moderation | An interaction measured by products of the two factors' indicators. |
| Assumption-dependent intervention effects | Interventional Mediation | G-computation estimates intervention outcomes from observed data under explicit identification assumptions. |
Practice: one observed-variable pathway with one control
In this exercise, x is the starting variable, m is the intermediate variable and y is the outcome. We want to describe the pathway x → m → y while retaining the direct x → y relationship. The letter z represents an adjustment variable, also called a control: a variable included to account for its relationship with the equation's outcome.
Download observed-workshop.csv. The first equation predicts m from x and z; the second predicts y from x, m and z. This puts z in both equations and keeps all variables directly observed. These are synthetic data for learning the calculation. They do not show that x happens before m or that m causes y.
The reference download supplies independent ordinary least squares (OLS) coefficients and their indirect-product arithmetic. OLS fits a linear relationship by minimising squared prediction errors. The reference does not include a bootstrap interval for the indirect effect. Use it to check the specified pathway and arithmetic, then calculate effect-specific uncertainty separately in the app.
Build and calculate the observed-variable pathway
Write the planned equations
Write m from x and z, followed by y from x, m and z. Keep x → m → y and the direct x → y path. In a real study, explain why z belongs in both equations using its meaning and measurement timing, rather than choosing it because it makes a result statistically significant.
What you should see: The written equations identify the direct and indirect paths.
How to read it: Include the intended covariates consistently.
Enter the graph-defined PROCESS setup
Open Calculate and choose Regression. Set Regression type to Graph-defined Path Analysis / PROCESS. Under Graph-defined relationships, select y as Outcome and x as Focal predictor. Use Directed paths and Add path to include x → m, m → y and x → y. Select z under Controls; the app enters that control in every equation.
What you should see: The graph-defined PROCESS setup matches those equations.
How to read it: Check arrow directions and variable roles.
Check the cases, scale and preview
Review the Relationship preview and data profile. Use the same complete cases for both continuous-outcome equations. Keep the variables on their raw, unstandardized scale to compare with the reference; if using the extended configuration, check Final variable metric. Retain the intercepts, which give each equation its baseline level.
What you should see: The preview identifies cases, scales and reference values.
How to read it: Correct a mismatch before requesting derived effects.
Request uncertainty for the whole system
Under Bootstrap inference, select Case-resampling bootstrap, then enter Bootstrap samples, Parallel workers and Seed. Choose Configure PROCESS inference to set Confidence level (%) and Test direction when needed. Choose the direction before viewing results. The bootstrap must refit the complete pathway, not just one of its equations.
What you should see: The whole-system uncertainty plan is selected.
How to read it: Separate path tests do not test their product.
Read the named effect rows
Choose Start calculation and open the completed result. Inspect Equation coefficients and Reference effects, then Bootstrap summary and Bootstrap inference for the specific indirect effect and the other requested effects. Match each interval to the effect and pathway named in its row, and check usable and failed refits. The two component coefficients' separate tests do not supply the uncertainty of their product.
What you should see: The result names each direct, indirect and total effect.
How to read it: Interpret the intended pathway with its own interval.
Keep the moderation exercise separate
Save this unmoderated result before adding an interaction. If z is to become the moderator in a new exercise, remove it from Controls before choosing it under Add moderator, then use Moderate a path to identify the affected relationship. Read the conditional effects and generated probe values for that specification; do not reuse the original unconditional product.
What you should see: The moderation model is saved as a separate exercise.
How to read it: Its interaction and slopes answer a different question from mediation.
Check the indirect, direct and total coefficients
In the independent reference, the x-to-m coefficient is 0.627017. The m-to-y coefficient, accounting for x and z, is 0.688776. Multiplying their full-precision values gives an indirect product of 0.431874. The direct x coefficient is 0.291620. Adding the direct and indirect parts gives 0.723494.
The same total is the x coefficient when y is predicted from x and z without m. This equality is a useful check for this linear OLS system because the observations, controls and intercepts match. Do not assume the same decomposition applies unchanged to nonlinear outcomes, interactions or equations fitted to different cases.
Use coefficients from the same system. Combining an unadjusted x-to-m coefficient with an adjusted m-to-y coefficient would describe a different calculation. Also keep estimation separate from uncertainty: multiplying the lower and upper endpoints of two coefficient intervals generally does not produce a valid interval for their product.
On a small screen, swipe the table sideways to see every column.
| Independent reference | Value, rounded | Meaning |
|---|---|---|
| a: x to m, controlling z | 0.627017 | First pathway segment. |
| b: m to y, controlling x and z | 0.688776 | Second segment with the stated adjustment. |
| Specific indirect | 0.431874 | Product for this linear pathway. |
| Direct | 0.291620 | x association in the y equation alongside m and z. |
| Total | 0.723494 | Direct plus specified indirect association. |
Calculate uncertainty for the indirect effect itself
A complete-system bootstrap draws participant rows with replacement, fits both equations to that same draw and then calculates their product. Drawing with replacement allows a row to appear more than once. Refitting the equations together preserves how their estimates depend on the same participants. Bootstrapping only one equation answers a narrower question.
Choose the confidence level and test direction before reading the indirect result. Report its original estimate, named interval, usable draws and failed fits. You do not need to impose an extra screening rule that every component coefficient must first pass a separate significance test; read the product's own inference under the selected procedure.
For illustration, an indirect estimate of 0.20 with a 95% interval from 0.05 to 0.36 suggests a positive indirect association under that model and its sampling assumptions. It does not establish that changing x would change m and then y. These hypothetical values are separate from the CSV reference and must not be attached to its coefficient.
Investigate the reason before changing the model
If hand arithmetic disagrees with the output, first compare the exact cases, scale, controls and named pathway. Rounding can create a small difference; different specifications can create a meaningful one. If the total indirect effect is small, inspect the specific pathways: positive and negative pathways can offset one another.
If an interval is wide or includes zero, describe the uncertainty and consider whether measurement, sample size or the proposed pathway needs further study. If the interval is unavailable, inspect failed fits and sample counts. These are different situations, and neither is a reason to remove difficult cases or controls merely to obtain a preferred conclusion.
On a small screen, swipe the table sideways to see every column.
| Symptom | Check | Reasonable action |
|---|---|---|
| Hand multiplication differs | Cases, controls, scale and specific path | Use coefficients from the same system. |
| Total indirect is small despite substantial paths | Signs of specific indirect effects | Report opposing pathways before their sum. |
| One path is nonsignificant but product interval excludes zero | Effect-specific inference | Interpret the product under its procedure. |
| Conditional and unconditional results are mixed | Interaction and moderator probes | Name the actual conditional expression. |
| An interval is unavailable | Failed equations and usable draws | Investigate stability and report the status. |
| Report claims a proven mechanism | Timing, confounding and design | Use association language unless identification is justified. |
Keep the reference calculation and interval example separate
Methods example: We predicted m from x and z, and y from x, m and z, using the same cases and an intercept in each equation. The specific indirect association was the product of the x-to-m and m-to-y coefficients. To report uncertainty, add the full-system case-bootstrap method, sample count, seed, confidence level, direction and actual failures from your calculation. Do not imply that an interval was calculated if you only checked the point estimates.
Reference Results: The independent calculations gave an indirect product of 0.431874, a direct coefficient of 0.291620 and a total of 0.723494. These verify the arithmetic for the dataset and specified equations. They do not supply indirect-effect uncertainty or establish a causal mechanism.
Separate hypothetical reporting example: A 95% bootstrap interval for an indirect estimate of 0.20 ranged from 0.05 to 0.36. This sentence illustrates how to report an interval. Its invented limits must not be attached to the reference estimate of 0.431874.
| Reporting item | Entry |
|---|---|
| Pathway | x to m to y; direct x to y |
| Adjustment | z in both equations; justify its role |
| Reference indirect | 0.431874, independent calculation |
| Reference direct and total | 0.291620 and 0.723494 |
| Uncertainty | Actual interval, confidence, draws, seed and failures |
| Conditional extension | Moderator roles, scale, probes and expressions |
| Causal scope | Timing and confounding assumptions supported by the design |
Can you explain the pathway from setup to conclusion?
- Write both equations and show where the controls and intercepts enter.
- Recalculate the reference indirect product and the direct-plus-indirect total using full-precision coefficients.
- Explain why multiplying two separate interval endpoints does not give the uncertainty of their product.
- State what extra design and confounding arguments would be needed for a causal mediation claim.
- Calculate the three hypothetical conditional products and identify the scale on which the moderator was evaluated.
- Name each specific pathway before reporting their sum, especially if their signs differ.
What changes when a moderator affects the pathway?
Suppose z changes the x-to-m relationship. In a simple linear interaction model, write that first-stage coefficient as a(z) = a1 + a3 × z. Here a1 is the first-stage slope when z is zero, and a3 describes how the slope changes as z increases. If the later m-to-y coefficient b does not change with z, the conditional indirect expression is a(z) × b. State the scale and moderator value used in each calculation.
With hypothetical a1 = 0.40, a3 = 0.10 and b = 0.50, the indirect values at z = -1, 0 and 1 are 0.15, 0.20 and 0.25. These numbers demonstrate arithmetic; they are not workshop estimates or a claim that the observed-variable PROCESS screen accepts those custom probes. That route reports probes generated from the analysed sample: the mean and one sample standard deviation below and above it for a continuous moderator, or 0 and 1 for a binary moderator. Standard deviation describes the spread of values around their mean.
Retain the main effects and other required lower-order terms when adding interactions. A supported interaction does not mean every conditional indirect effect differs from zero. Nor does significance at one probe and nonsignificance at another establish a difference between the two effects. Read the named index or contrast and its own uncertainty when that comparison is supplied.
Match the workflow to the question. PLS conditional process evaluates paths in a PLS model, while observed-variable PROCESS fits its graph-defined equations. Latent-by-observed CB-SEM moderation and factor-by-factor product indicators use their own measurement assumptions. Interventional effects additionally need a defined treatment contrast and causal assumptions.
Decide what the study design can support
A causal mediation argument needs a defensible time order and an account of relevant common causes, often called confounding. Measuring x, m and y on one occasion does not establish that x preceded m and m preceded y. Including a variable affected by x can also change the causal question rather than simply provide better control.
Explain z's role before fitting the model. It could be a pre-existing common cause, a consequence of x or a correlated variable with no justified adjustment role. The synthetic file cannot choose that role for a real study. Its reference calculation only shows the statistical decomposition after adjusting for z.
A useful sensitivity analysis compares substantively defensible adjustment or pathway choices and explains how the conclusion changes. Trying many controls until the interval excludes zero is exploratory searching. Preserve the planned result and label any exploratory revision clearly.
Reproduce the three-regression arithmetic check
Use the observed-variable workshop to check the decomposition separately from its research meaning. Fit m from x and z, then y from x, z and m, using an intercept and the same 120 cases. A third regression predicts y from x and z without m. These are unweighted OLS regressions on the same observed columns.
Rounded to four decimal places, a = 0.6270 is the x-to-m coefficient and b = 0.6888 is the m-to-y coefficient accounting for x and z. Their full-precision product rounds to 0.4319. The direct x coefficient is 0.2916, and adding it to the indirect part gives a total that rounds to 0.7235. This equals the x coefficient in the total model for this linear, no-interaction setup. Use the full-precision reference when checking close agreement.
This equality checks the stated linear decomposition. It does not show that m carries a causal effect in a real population. Separate significance tests for a and b do not provide the indirect effect's confidence interval. Use the full-system indirect-effect procedure for uncertainty, and explain time ordering and confounding if making a causal argument.
Keep this observed-variable check separate from latent-variable PLS or CB-SEM mediation. Construct scores, treatment of measurement error, interactions and interventional definitions can change what is being estimated. The same diagram shape is not sufficient evidence that two numerical effects should match.
For the separate arithmetic check, open Calculate → Regression and select Ordinary least squares. Run m as Outcome variable with x and z as Predictors; then run y with x, z and m; finally run y with x and z. Keep Include intercept enabled and use the same complete cases. Read the required coefficients in each result's Coefficients table. These separate regressions check the decomposition; use the complete PROCESS graph for indirect-effect uncertainty.
On a small screen, swipe the table sideways to see every column.
| Quantity | Reference value | Meaning in this exercise |
|---|---|---|
| a | 0.6270 | x coefficient in m ~ x + z |
| b | 0.6888 | m coefficient in y ~ x + z + m |
| a × b | 0.4319 | Product along the specified indirect path |
| Direct | 0.2916 | x coefficient with m and z in the outcome model |
| Total | 0.7235 | x coefficient with z in the outcome model, without m |
State the pathway you actually fitted
A useful report names the starting variable, intermediate variables, outcome, any moderator and the values at which effects were evaluated. It also explains the controls, uncertainty procedure and what the design permits you to conclude about cause and effect.
If you revise a model because the original combination cannot be calculated, record the revised question. Removing an interaction or a pathway changes the analysis. Use the guides below for the specific variable types and effect definitions you need.