Method guide / Observed variables & data

Regression

Regression estimates how an observed outcome relates to one or more predictors. Choose the model according to the outcome and the research question.

54 min read including optional topics

What the method does

Ordinary least squares (OLS) models a continuous outcome by minimising squared residuals. Binary logistic regression models the probability of a two-category outcome. Regression paths can also form mediation or moderation models. Coefficients describe conditional relationships on the model’s scale; causal interpretation needs a suitable design and assumptions.

OLS: Y = b₀ + ΣⱼbⱼXⱼ + ε. Logistic: log[p/(1 − p)] = b₀ + ΣⱼbⱼXⱼ.

In OLS, bⱼ is the expected outcome change for one unit of Xⱼ with other predictors fixed. In logistic regression, bⱼ is a log-odds change and exp(bⱼ) an odds ratio. Neither interpretation applies without retaining the coding and reference category.

Data and analysis in QuickPLS

Use one case per row, a correctly coded outcome and suitable predictor columns. Define categorical reference levels and inspect missingness, dependence among cases and predictor collinearity.

QuickPLS provides OLS, binary logistic and PROCESS-style path workflows. Select the outcome-appropriate route below, then inspect model diagnostics and uncertainty before reporting coefficients.

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.

Choose one of three routes

Start with the outcome: the quantity or event you want to explain. Then choose the question. The Regression menu offers three different analyses, each with its own interpretation. You can follow the relevant route below without reading every optional extension first.

Numeric outcome: choose Ordinary least squares, usually shortened to OLS, for a continuous outcome such as a measured score. It estimates how the outcome's average differs with a predictor while accounting for the other variables in the equation. The first exercise models y from x, z and m.

Yes/no outcome: choose Binary logistic regression when the response is coded 0 or 1. It models the probability of the event coded 1 through an equation on the log-odds scale. The binary exercise uses binary_outcome, with x and z as predictors. Odds and probabilities are explained before interpreting its results.

Mediation or moderation: choose Graph-defined Path Analysis / PROCESS when your question concerns a pathway through another variable, or a relationship that changes with a moderator. A mediator is an intermediate variable in a proposed pathway. A moderator is a variable whose value changes the relationship being studied. This route connects explicitly specified regression equations with continuous outcomes.

These routes analyse observed quantities or scores you deliberately prepare. They do not estimate latent constructs, meaning underlying concepts measured through a separate measurement model, or automatically correct measurement error. Choose the method before assigning variables, then interpret its coefficients using the study design and the assumptions of that method.

Write down the outcome and each variable's role

Name the outcome and the predictors whose relationships interest you. A control is another variable included to account for a relevant difference; it enters the equation too. Explain why each belongs in the model. Adding a variable because it improves a p-value is a different decision from choosing it to answer the research question.

Check variable units, missing entries, impossible codes and any prepared scores. For logistic regression, confirm exactly which event is coded 1 and that both response classes are present. For PROCESS, write the equations, mediators and moderated paths before opening the editor. Keep identifiers, group labels and weights out of predictor lists unless they have a justified role supported by the selected analysis.

Choose OLS, binary logistic regression or Graph-defined Path Analysis / PROCESS to match that question. Record the sample and preparation. A complete case has usable values for every variable required by the calculation; changing the variable set can change which cases remain.

Meet the 120-case practice dataset

This lesson uses observed quantities and deliberately prepared scores. Follow OLS for the continuous y outcome, logistic regression for binary_outcome, or PROCESS for the proposed x-through-m pathway. They share a menu and some controls, but their estimates answer different questions.

Download observed-workshop.csv. It contains 120 synthetic cases, continuous variables x, z, m and y, binary_outcome coded 0 or 1, and separate group and weight columns. Begin by estimating y from x, z and m with an intercept. Leave the identifier, group, weight and binary response outside that predictor list.

The numerical reference was calculated independently in Python from this exact downloadable CSV. Its OLS table uses HC3 robust standard errors and Student-t intervals; its logistic table uses maximum-likelihood reference estimates. Student-t is the reference distribution used for the OLS uncertainty calculation. Maximum likelihood selects parameter values that make the observed responses most plausible under the model.

These are checked reference calculations, not results from a new QuickPLS app run. Follow the app steps, then compare the same variables, cases, intercept and statistical definitions. The hypothetical probability conversion, IPMA arithmetic and bootstrap reporting template are separately identified below so they cannot be mistaken for calculated workshop outputs.

Find the method and assign the variables

For the first exercise, use observed-workshop.csv and select Ordinary least squares before assigning y as Outcome variable and x, z and m as Predictors. The binary exercise and PROCESS exercise below each require a separate setup. Changing Regression type changes the analysis; it does not merely change how the same result is displayed.

  1. Open Regression

    Select the intended numeric dataset, open Calculate and choose Regression under Standalone analysis. Check the data version before assigning variable roles.

  2. Choose the route, then its inputs

    Set Regression type first. For OLS or binary logistic regression, assign Outcome variable, Predictors and optional Controls. For Graph-defined Path Analysis / PROCESS, set Outcome and Focal predictor, then define directed paths and any moderators. Review the inference settings for the chosen route.

  3. Calculate and read the correct output

    Check the data profile and readiness messages, then start the calculation. Read OLS estimates in outcome units, logistic estimates as log-odds or odds ratios, and PROCESS effects against the equations that define them. Begin with the calculation status and analysed sample before drawing a conclusion.

Screenshot to be addedRegression settings with the intended dataset and completed selections

Route 1: model a continuous outcome with OLS

Ordinary least squares fits the average of a continuous outcome at specified predictor values. It chooses coefficients by minimising the sum of squared residuals. A residual is the observed outcome minus the value fitted by the model. Squaring gives larger errors more weight in that calculation.

A coefficient describes an outcome-unit difference associated with a one-unit predictor difference, holding the other included predictors fixed. Read the units and the equation's form. Inspect residual patterns and overlap between predictors before interpreting the coefficient. Strong overlap, called collinearity, can make separate relationships difficult to estimate precisely.

  1. Assign the numeric outcome

    In Regression, set Regression type to Ordinary least squares. Choose the continuous Outcome variable, the Predictors and any justified Controls.

  2. Check the equation and uncertainty settings

    Review Include intercept, Robust standard errors, Test direction and Confidence level (%). The intercept is the fitted value when the included predictors equal zero. Confirm the complete cases and residual degrees of freedom, which account for the number of estimated coefficients, then calculate.

  3. Read coefficients alongside model checks

    Read Calculation scope, Coefficients and Model fit. Inspect intervals, residual patterns, R-square, adjusted R-square and the error scale. R-square describes fitted variation in the analysed sample; adjusted R-square also accounts for model size. Neither replaces a check of the equation and data.

Fit y from x, z and m

  1. Select OLS and the reference variables

    Open Calculate and Regression. Set Regression type to Ordinary least squares, Outcome variable to y, and select x, z and m as the three Predictors. Do not add other columns for this reference comparison.

    What you should see: OLS is selected with the stated continuous outcome and predictors.

    How to read it: Use logistic regression for the separate binary-outcome exercise.

  2. Keep Include intercept enabled

    The reference includes an intercept, which lets the fitted line have a nonzero baseline. Removing it changes the model, residual degrees of freedom and some fit definitions. Confirm that the calculation uses the common complete-case sample.

    What you should see: Include intercept is enabled.

    How to read it: Omitting it forces the fitted equation through the origin and changes the model.

    Regression: focused settings
    Regression settings in QuickPLS. Select your own dataset and model, then use the choices described in the steps.
  3. Match the uncertainty calculation

    Set Robust standard errors to HC3, Test direction to Two-sided and Confidence level (%) to 95. The reference uses HC3 with Student-t inference and 116 residual degrees of freedom. HC3 allows the error variance to differ across cases; it does not change the OLS point estimates.

    What you should see: The covariance or uncertainty option matches the reference calculation.

    How to read it: Coefficient agreement does not imply every standard-error procedure will agree.

  4. Calculate and check the sample

    Choose Start calculation and open the completed result. Read its case count in Run details, then open Coefficients and Model fit. The reference has 120 cases and 116 residual degrees of freedom: 120 minus the intercept and three estimated slopes. A different case count needs checking before comparing coefficients.

    What you should see: The completed result reports the expected analysed sample.

    How to read it: Resolve omitted or misread cases before comparing answers.

  5. Read the equation with its diagnostics

    Inspect predictor overlap, residual patterns and the error scale alongside the coefficients. An estimate can be finite even when the equation describes the outcome poorly. Investigate coding errors or a justified alternative form before deciding what a weak result means.

    What you should see: The coefficient table and residual diagnostics refer to the same equation.

    How to read it: Read scales and reference categories before interpreting effects.

Check the 120-case fitted equation and interval table

The following numbers were calculated independently from observed-workshop.csv. They correspond to the exact downloadable data, but are not presented as a new QuickPLS app run. Follow the app instructions, then match the sample, variables and uncertainty definitions before comparing outputs.

Use continuous y as the outcome, x, z and m as predictors, and include the intercept. Use all 120 complete cases. Leave case_id, binary_outcome, group and weight out of this ordinary unweighted equation. The question is how each predictor relates to y after accounting for the others; the model does not estimate an intervention effect by itself.

The fitted equation is y-hat = -0.0606 + 0.2916 x + 0.0018 z + 0.6888 m. Y-hat means the outcome value fitted by the equation. For x, a one-unit difference corresponds to an estimated 0.2916-unit difference in average y at the same z and m values. The intercept is the fitted value at x = z = m = 0. That reference is meaningful here because the teaching variables lie around that range.

R-squared is 0.5061, so the fitted equation accounts for about 50.6% of the observed variation in y. It does not mean that 50.6% of individual predictions will be correct. Residual standard error is 0.8326 in y units. There are 116 residual degrees of freedom because 120 observations estimate an intercept and three slopes.

Select HC3 for this exercise. The table uses independent HC3 robust standard errors and a Student-t reference with 116 degrees of freedom. HC0 and HC4 are different standard-error adjustments; a bootstrap is a different uncertainty procedure again. They can produce different intervals without changing the OLS point estimate. Match the procedure and cases before concluding that two outputs disagree.

Read the interval and p-value together with the estimate. For a two-sided coefficient test, the reference value is zero. A small p-value is evidence against that reference under the model and test assumptions; it is not the probability that your research hypothesis is true. The units and interval determine whether the estimated association could matter in practice.

On a small screen, swipe the table sideways to see every column.

TermEstimateStandard error95% intervalTwo-sided p value
Intercept-0.06060.0756-0.2103 to 0.08920.424805
x0.29160.11020.0734 to 0.50990.00926182
z0.00180.0721-0.1410 to 0.14460.979944
m0.68880.10440.4820 to 0.89561.30757e-09
Screenshot to be addedOLS coefficients for the practice equation

Interpret the OLS coefficient table

The independent reference estimates are x = 0.291620, z = 0.001817 and m = 0.688776, with intercept -0.060551. For x, compare cases at the same included z and m values: a one-unit x difference is associated with an estimated 0.291620-unit difference in average y under this equation. This adjusted relationship is not the unadjusted x-y correlation.

R-square is 0.506093, describing the share of observed y variation accounted for by the fitted model on these cases. The residual standard error is 0.832631 in y units, a summary of the remaining residual spread. An R-square near 0.51 does not mean that 51% of cases were classified correctly; the outcome is continuous and this is not a classification rate.

The independently calculated HC3 95% interval for x is approximately 0.073374 to 0.509865. It gives a range expressing estimation uncertainty under the stated calculation. Read the size of that range against the outcome's meaning, rather than using only whether it crosses zero.

HC3 allows unequal error variance across cases. The OLS point estimate stays the same while its uncertainty calculation changes. It does not correct omitted-variable bias, reverse causation or dependence between cases. Those require separate reasoning about the equation and study design.

On a small screen, swipe the table sideways to see every column.

Independent OLS referenceEstimateHC3 standard error95% t interval
Intercept-0.0605510.075601-0.210288 to 0.089185
x0.2916200.1101900.073374 to 0.509865
z0.0018170.072110-0.141006 to 0.144639
m0.6887760.1044050.481988 to 0.895564

Read the estimate on the scale it actually uses

For OLS, a coefficient describes an estimated difference in the outcome for a one-unit predictor difference while holding the other included predictors fixed. Conditional on the predictors means that those other variables remain in the comparison. The coefficient is not the same as an unadjusted correlation between two variables.

For logistic regression, a coefficient changes log-odds. Odds are event probability divided by non-event probability; taking their logarithm gives log-odds. Exponentiating the coefficient converts it into an odds ratio, a multiplier of the odds. It does not give a probability difference or a risk ratio.

For PROCESS, first name the equation or effect. A direct coefficient follows a specified path. An indirect effect follows a pathway through a mediator. A conditional effect is evaluated at a stated moderator value. The numbers need the full path definition, controls, units and coding.

Read each estimate with uncertainty and diagnostics. A standard error measures estimation precision under the chosen procedure. A confidence interval expresses uncertainty as a range on the relevant scale. Check which method produced it and whether the calculation was usable before interpreting a p-value or deciding whether the finding matters.

On a small screen, swipe the table sideways to see every column.

OutputHow to read itWhat to check
OLS coefficientExpected outcome difference per predictor unit, conditional on other included predictors.Read units and residual diagnostics.
Logistic coefficient / odds ratioChange on a log-odds or multiplicative odds scale.An odds ratio is not a probability difference.
Path / indirect effectThe relationship or product defined by the observed-variable graph.Temporal and causal assumptions come from the design.
OLS coefficient estimates from a separate regression example. Read the variable name, estimate and uncertainty together.
OLS coefficient estimates from a separate regression example. Read the variable name, estimate and uncertainty together.

Explain the near-zero z estimate without chasing significance

The z estimate is 0.0018, with a 95% interval from -0.1410 to 0.1446. After x and m are included, the result does not give a clear positive relationship for z. Begin with why z belongs in the model, whether its coding is correct and which adjusted question you planned to answer. A large p-value alone is not a reason to delete it.

If z is an important prespecified control, retaining it may be part of the intended analysis. A model without z may answer another defensible question, but save and label that comparison separately. Inspect how the other coefficients and their uncertainty change and explain why the alternative was considered. Choose the model for the question rather than for the number of small p-values.

A suitable teaching statement is: "The adjusted estimate for z was close to zero, with an interval spanning modest associations in either direction." This does not prove that the true relationship is exactly zero. To judge whether the interval rules out practically important associations, define the smallest effect that would matter in the study's units. The invented units here cannot settle that judgement for a real paper.

Trace an influential case back to its original record

A residual is observed y minus fitted y. Leverage describes how unusual a case's predictor combination is compared with the fitted data. Cook's distance combines residual size and leverage to summarise potential influence on the coefficients. These answer different questions: a case with unusual predictors can fit the relationship well, while a case with ordinary predictors can have a large residual.

The table shows the three largest Cook's distances in the complete teaching file. They identify cases to inspect, not records that are automatically wrong. Use the case IDs to return to the CSV, check the source values and consider whether the observations belong to the population you intend to study. If there is a defensible influence concern, preserve the primary result and report a clearly labelled sensitivity analysis.

For a separate correction exercise, open observed-workshop-challenge.csv. The notes document a factor-of-ten error in y for o017 and a missing-value code of -888 in z for o042. Correct them by checking the documented original values. The complete-file table below is not the result of analysing the challenge file.

The diagnostic download contains all 120 cases, fitted values, residuals, leverage, internally studentized residuals and Cook's distances. Here, a studentized residual divides the residual by its estimated standard deviation within the fitted model. These are same-data diagnostics. They are not prediction errors on held-out cases that were excluded when fitting the equation.

On a small screen, swipe the table sideways to see every column.

CaseResidualLeverageCook’s distance
o0461.89120.06570.0971
o090-1.05170.09860.0484
o119-1.92550.03350.0479
Screenshot to be addedInspect a fitted case and its residual

Route 2: model an event coded zero or one

Binary logistic regression models an outcome coded 0 or 1. Identify the event coded 1 before interpreting a coefficient. The equation uses log-odds so the resulting event probabilities remain within their valid range. Exponentiating a coefficient gives an odds ratio: above one indicates higher modelled odds for the stated predictor increase, and below one indicates lower odds, holding other predictors fixed.

An odds ratio differs from a risk ratio, which compares probabilities. Read predicted probabilities at meaningful predictor values when you need to explain a practical change. Also check convergence, meaning whether the numerical fitting process met its stopping conditions, and separation, where predictor patterns distinguish response classes too perfectly for ordinary finite estimates.

  1. Choose the binary route and event

    Set Regression type to Binary logistic (outcome coded 0/1). Select the binary Outcome variable, Predictors and optional Controls. Read the Complete-dataset outcome profile to check both classes, values outside 0/1 and the complete-case count.

  2. Review estimation and inference

    If needed, open Configure estimation and inference. Review Include intercept, Test direction and Confidence level (%). Maximum iterations caps the numerical search steps. Log-likelihood tolerance sets how small the change in the fitting criterion must be before stopping; it is not a significance threshold. Calculate and read convergence or separation messages before interpreting estimates.

  3. Interpret the result on the right scale

    Read coefficients as log-odds changes and odds ratios as multipliers of event odds. Read predicted probabilities separately at stated predictor values. A large odds ratio needs its uncertainty and a usable fit; it is not automatically strong practical evidence.

Fit binary_outcome from x and z

Open a separate Regression setup and change Regression type to Binary logistic (outcome coded 0/1). Select binary_outcome as Outcome variable, choose x and z as Predictors and retain Include intercept. Check that 1 is the intended event and both response classes are present. Choose Start calculation. In the completed result, read Binary outcome profile and Estimator convergence before opening Coefficients, Wald inference, and odds ratios. The reference has 57 events among 120 cases.

The independent x coefficient is 0.554645 on the log-odds scale. Exponentiating it gives an odds ratio of approximately 1.741323. Holding z fixed, a one-unit x increase multiplies the modelled event odds by 1.741323. It does not multiply the event probability by that number.

Here is a separate hypothetical conversion. Suppose the starting probability is 0.20. Its odds are 0.20 / 0.80 = 0.25. Multiplying by the reference odds ratio gives approximately 0.435331. Convert those new odds back to probability by dividing them by one plus the odds, giving 0.303296. This teaches the scale; it is not a prediction for a particular workshop case.

Before interpreting the table, inspect convergence and separation diagnostics. If predictor patterns perfectly or almost perfectly distinguish the response classes, ordinary finite maximum-likelihood estimation may be unreliable or unavailable. Check response coding, class counts and sparse predictor combinations. This binary analysis does not automatically provide ordinal or multinomial models.

On a small screen, swipe the table sideways to see every column.

Independent logistic referenceLog-odds coefficientOdds ratio
Intercept-0.1240450.883340
x0.5546451.741323
z-0.2278750.796224
Screenshot to be addedBinary outcome and logistic results

Compare odds ratios with probabilities at stated predictor values

Use binary_outcome as the response, with event 1, predictors x and z, and an intercept. The reference includes 57 events among 120 cases. Do not select continuous y as the binary response. This route models a different outcome and asks a different question from the OLS exercise, even though it shares some predictors.

The x coefficient is 0.5546 on the log-odds scale. Exponentiating it gives an odds ratio of 1.7413. Holding z fixed, a one-unit x increase multiplies the modelled odds by about 1.74. It is not an increase of 74 percentage points in probability. The probability change depends on the starting predictor values.

In this reference equation, the fitted probability at x = 0 and z = 0 is 0.4690. At x = 1 with z still 0, it is 0.6060. That comparison changes probability by about 13.7 percentage points. These are predictions at stated values from the independent reference, distinct from the earlier hypothetical baseline conversion. They illustrate how a constant odds ratio can produce different probability changes at different starting points.

Read uncertainty alongside each odds ratio. The table uses conventional Wald intervals calculated on the log-odds scale, then exponentiated. A Wald approximation uses the estimate and its standard error with a reference distribution; a likelihood-ratio test compares fitted likelihoods and is a different calculation. Do not present one as the other.

For an odds ratio, the no-association reference is one, corresponding to zero on the log-odds scale. If estimates are unavailable, errors are very large or the app reports separation, inspect response counts and predictor patterns before interpreting the ratio. A large number from an unstable fit does not establish a large dependable relationship.

On a small screen, swipe the table sideways to see every column.

TermLog-odds estimateOdds ratioWald 95% odds-ratio interval
Intercept-0.12400.88330.6098 to 1.2796
x0.55461.74131.1152 to 2.7189
z-0.22790.79620.5501 to 1.1524

Understand an odds ratio before turning it into words

The example below explains a common reporting mistake. Odds compare the probability of an event with the probability that it does not occur. Probability describes the event's share of all possible outcomes. Because they use different denominators, multiplying the odds does not multiply the probability by the same amount.

To translate an odds ratio into a probability change, specify a starting probability and the predictor values being compared. The worked binary example shows both the conversion arithmetic and predictions at stated x and z values. Keep a hypothetical starting point separate from a prediction for an actual case.

Illustrative example, not a software benchmark

An odds ratio of 2 means that the modelled odds multiply by two for the stated predictor change, holding other predictors fixed. It does not mean probability doubles. The probability change depends on the starting odds. This example explains the scale; it is not a calculated application result.

Route 3: specify observed-variable mediation or moderation

An observed-variable path model connects regression equations you can write down. For mediation, one equation explains an intermediate variable and another explains the final outcome. For moderation, an interaction allows a relationship to vary with a moderator. The interaction combines the relevant variables; its coefficient describes how a slope changes, rather than the slope at every moderator value.

Set the paths and moderator roles before interpreting conditional effects. A conditional probe is a moderator value at which an effect is evaluated. The supported PROCESS workflow reports probes based on the original analysed sample: for a continuous moderator, its mean and values one sample standard deviation below and above that mean; for a binary moderator, 0 and 1. Standard deviation measures spread. Review these values in the final variable metric rather than looking for a custom-probe control.

Inputs are measured variables or explicitly constructed scores. The graph defines their equations, not a latent measurement model. A causal reading also needs a study design and assumptions about timing and other influences; the arrows alone do not establish those conditions.

  1. Define the outcome and directed paths

    Choose Graph-defined Path Analysis / PROCESS under Regression type. Set Outcome and Focal predictor. Use Add path, with From and To, to specify the continuous-outcome equations. Select Controls deliberately; this editor enters them in every equation.

  2. Assign moderation and review inference

    For moderation, use Add moderator and set Scale / coding. Then choose Moderate a path and identify the Path and moderator roles. Confirm the common complete-case profile and review the inference choices before calculating. Interpret the reported probes in the final metric used for the variables.

  3. Read the graph and effect tables together

    Match each equation coefficient, direct effect, indirect effect and conditional effect to its path. Where available, Johnson-Neyman output identifies moderator ranges where the conditional slope differs from zero under the stated uncertainty calculation. Read its range and procedure, not only the significance label.

Build and read the x-to-m-to-y pathway

For the observed-variable mediation exercise, open a separate Regression setup and select Graph-defined Path Analysis / PROCESS. Set Outcome to y and Focal predictor to x. Use Add path to specify x to m, m to y and x to y. Select z under Controls; the editor enters it in every equation. The resulting equations explain m from x and z, and y from x, m and z. Keep the direct x-to-y path. Choose Start calculation, then inspect Directed paths and Equation coefficients before reading Reference effects.

The independent reference gives a = 0.627017 for x to m and b = 0.688776 for m to y. Their product is 0.431874. Adding the direct coefficient 0.291620 gives total 0.723494, matching the x coefficient in the corresponding total-outcome regression with z included. These are independent OLS calculations from the controlled equations. They are not indirect-effect confidence intervals or evidence of a new PROCESS app execution.

Practise moderation in a separate specification with y as Outcome, x as Focal predictor and the x-to-y path. Remove z from Controls before assigning it as a moderator. Use Add moderator to choose z and its continuous Scale / coding, then Moderate a path to assign z to the x-to-y relationship. The model needs the x and z main effects as well as their interaction. The interaction coefficient describes how the slope changes with z; read the reported slopes at stated z values to explain the relationship.

The supported workflow generates conditional probes from the original analysed sample and reports them in the final variable metric. Continuous probes use the mean and one sample standard deviation below and above it; binary probes use their coded levels. Record the actual reported values. They are not a request to enter an invented low, medium or high value in a custom-probe field.

Where available, Johnson-Neyman output describes the moderator range in which a conditional slope differs from zero under its stated uncertainty calculation. Read the observed range and the method used. These regions and plot bands remain separate from the direction chosen for an effect-specific bootstrap interval. The observed-variable graph itself neither estimates latent measurement nor establishes causal ordering.

Screenshot to be addedThe observed-variable mediation graph

Bootstrap the whole path system for indirect effects

An indirect or conditional effect can depend on several coefficients estimated together. Resampling the cases and refitting the entire equation system preserves their joint variation in the uncertainty calculation. A bootstrap of only one equation cannot account for an effect that also depends on another equation.

Choose confidence level and test direction before inspecting effects. Read every named effect's interval with successful and failed outer-fit counts. An outer fit is a refit on a bootstrap sample. Nested studentization adds an inner bootstrap within each outer sample to estimate the uncertainty needed for a standardized bootstrap statistic, also called a pivot.

  1. Check the complete graph and sample

    Complete all PROCESS relationships. Confirm continuous equation outcomes, common cases, control assignments and the final variable metric. Each effect should have an unambiguous path definition.

  2. Enable the outer case bootstrap

    Set Bootstrap inference to Case-resampling bootstrap. Enter Bootstrap samples, Parallel workers and Seed. These outer samples refit the full supported path system.

  3. Set confidence and direction first

    Open Configure PROCESS inference if its controls are collapsed. Choose Confidence level (%) and Test direction before reading the effect estimates. A two-sided test considers either direction; a one-sided choice needs a predeclared directional question.

  4. Request nested studentized intervals when needed

    Open Configure groups, data metrics, scores and copulas and select Add nested studentized intervals. Use at least 999 outer Bootstrap samples and an odd Inner draws per outer fit value from 99 to 999. Too few usable pivots can leave an interval unavailable; record that result rather than substituting bounds.

  5. Read uncertainty for each named effect

    Calculate and inspect percentile, eligible BCa and any requested studentized intervals for the specific effects. Report the usable resamples, failures and settings that produced them.

  6. Separate conditional displays from interval choices

    Read effects at their reported moderator probes. Plot bands and Johnson-Neyman regions remain two-sided at the selected confidence level, even when the chosen effect test is one-sided. They are distinct outputs, not interchangeable intervals.

Calculate uncertainty for the complete pathway

Return to the completed PROCESS graph's setup. Set Bootstrap inference to Case-resampling bootstrap. Enter Bootstrap samples, Parallel workers and Seed. Open Configure PROCESS inference and choose Confidence level (%) and Test direction before examining the effects. Choose Start calculation. In the completed result, read Bootstrap summary for the requested and usable counts, then Bootstrap inference and any eligible Bootstrap BCa intervals for the named effects. This calculation must refit the equations used to define each effect on their common cases.

For nested studentized intervals, open Configure groups, data metrics, scores and copulas and enable Add nested studentized intervals. Choose at least 999 outer Bootstrap samples and an odd Inner draws per outer fit value from 99 to 999. A teaching choice of 1000 outer draws and 99 inner draws meets those count requirements. It does not guarantee that every effect produces a usable interval.

The inner samples estimate uncertainty within each outer refit. Studentization uses that uncertainty to scale the change from the original estimate. If too few valid standardized statistics are available, the interval is unavailable. Read that status and the failure counts. More draws cannot identify an equation system that lacks the required information or make an unsupported combination valid.

Read percentile, BCa and any requested studentized intervals for each named effect. For the indirect product, the jointly refitted system supplies its uncertainty. Multiplying the endpoints of the separate a and b intervals is not an alternative way to obtain that interval. Conditional probes, plot bands and Johnson-Neyman regions have their own definitions and should retain their labels.

Screenshot to be addedFull-system bootstrap and indirect-effect interval

Find the reason for an unexpected result

Check the model you actually fitted before changing it. Confirm the outcome, coding, predictors, controls, intercept and analysed cases. Then separate an unusable fit from a usable estimate that is small or uncertain. The table below lists route-specific checks.

Correct documented data errors and keep the original analysis record. For a usable but weak result, return to the research question and read the interval in meaningful units. A justified alternative model can be saved as a separate sensitivity analysis. Repeatedly changing controls or deleting valid cases to obtain significance changes the question without strengthening its evidence.

On a small screen, swipe the table sideways to see every column.

SymptomCheckReasonable action
OLS coefficients differ from the referenceOutcome, x/z/m predictors, intercept and rowsMatch the specification before comparing uncertainty choices.
A logistic coefficient is extremely largeSeparation, class counts and convergenceInvestigate estimation failure rather than celebrating a large effect.
Bootstrap usable count is lowClass loss, rank deficiency or failed equationsReport the failure pattern and reconsider model stability.
Indirect effect seems inconsistentCovariates, complete cases and the full path definitionUse the same equation system and jointly estimated product.
IPMA suggests priorities in arbitrary unitsUnstandardized coefficients and meaningful scale boundsAvoid practical recommendations from invented teaching endpoints.
Durbin-Watson is interpreted as a time testWhether row order represents time and null assumptions holdPreserve meaningful order and report only the supported interpretation.
Subgroup scores differ unexpectedlyExact typed group value and preparation orderCheck selection before scoring and scaling.
Copula uncertainty looks too narrowWhether scoring and generated controls were refittedRead matching full-refit intervals and identification assumptions.

Give readers the model, scale and uncertainty

  • State whether you used OLS, binary logistic regression or graph-defined PROCESS. Name the outcome, its coding, the predictors and controls, and any mediator or moderator roles.
  • Report estimates on clearly identified scales, with their uncertainty, analysed sample and relevant diagnostics. For PROCESS, give the equations and named effects; for logistic regression, identify the event being modelled.
  • Explain the uncertainty procedure and its settings. Report resampling counts and failures when used, and record any score construction, subgroup selection or model revision that changes the analysis.

Write a Methods and Results account that matches the evidence

Example Methods: We modelled continuous y from x, z and m with an intercept on the 120 complete synthetic cases. The independent numerical reference used OLS, HC3 robust standard errors and Student-t intervals with 116 residual degrees of freedom. Coefficients were interpreted conditional on the included predictors, with residual and collinearity diagnostics examined. Any bootstrap analysis was reported separately.

Reference Results: Independent Python calculations gave an x coefficient of 0.291620, with HC3 95% t interval 0.073374 to 0.509865, and an m coefficient of 0.688776. R-square was 0.506093 and residual standard error was 0.832631. These are reproducible reference calculations, not a claim that QuickPLS was newly executed or that the associations are causal.

Hypothetical bootstrap template: A separate 1000-draw case-bootstrap analysis produced a 95% interval of 0.08 to 0.51 for x. These bounds are invented to illustrate reporting. Replace them with the saved analysis's actual interval, procedure and requested, usable and failed counts before using the sentence.

For a logistic report, identify the event, coefficient scale, odds-ratio interval and any predicted-probability comparison. For PROCESS, give the full equations, controls, moderator coding, reported probes and named effects with their matching uncertainty. Include optional extensions only when they were actually used and can be explained.

ItemReference or required entry
OLS specificationy from x, z and m; intercept; n = 120
OLS fitR-square 0.506093; residual error 0.832631
Coefficient scaleOutcome units per predictor unit, conditional on others
Logistic specificationbinary_outcome from x and z; event = 1
PROCESSActual equations, controls, probes and named effects
ExtensionsScore recipe, subgroup, IPMA ranges, ordered-residual assumptions or copula roles
UncertaintyHC3 for this exercise; identify any different procedure and report bootstrap counts, seed and failures.

Check that you can explain the model you ran

  • Reproduce the OLS case count and residual degrees of freedom, explaining which coefficients use that information.
  • Interpret the x coefficient while keeping z and m in the comparison. Explain how that differs from an unadjusted correlation.
  • Convert an odds ratio into a probability only after stating the baseline odds and predictor comparison.
  • Calculate the mediation product from the same controlled equations and distinguish that arithmetic from an interval for the effect.
  • Explain why a bootstrap of one regression cannot replace a complete PROCESS-system refit for an effect involving several equations.
  • Explain how score construction, final scaling and subgroup selection change the analysed variables or cases.
  • Justify the performance range and coefficient units before interpreting an IPMA position as a practical priority.
  • Explain when an ordered-residual probability or adjusted-copula interval is unavailable, and how you would report that status.

Keep the research conclusion tied to the chosen route

An OLS coefficient describes a difference in a numeric outcome. A logistic probability describes the chance of an event. A PROCESS indirect effect describes a specified pathway through linked equations. Use the scale and uncertainty belonging to that quantity when writing the conclusion.

For a weak but usable result, explain what the estimate and interval support in the study's units. For an unusable result, investigate the data or fitting problem first. Optional resampling, score construction or adjusted controls answer specific additional questions; none turns an observational association into a causal finding without the required design and assumptions.

Optional methods and settings

Estimate regression uncertainty by resampling cases

A case bootstrap repeatedly draws rows with replacement and refits the selected regression. With replacement means a row can appear more than once in a resample. Variation across those fits helps assess uncertainty. Keep the outcome coding, predictors, controls and intercept choice tied to the model being reported.

Read the usable-fit count, not only the requested count. A logistic resample can lose one response class or become separated. An OLS resample can become rank deficient if it lacks enough independent predictor information. These failures describe stability of the calculation and belong with its uncertainty results.

  1. Confirm the exact regression

    Check Regression type, outcome coding, predictors, controls and Include intercept. The bootstrap should refit the same specification you intend to interpret.

  2. Enable and configure resampling

    Set Bootstrap inference to Case-resampling bootstrap. Enter Bootstrap samples, Parallel workers and Seed, and review the options for that regression type. Workers control how many calculations run together; the seed starts the random sampling sequence.

  3. Read estimates, intervals and failures together

    Read the original coefficients with bootstrap intervals and requested, usable and failed-fit counts. Keep analytical point-fit tests separate from decisions based on bootstrap intervals. If a BCa interval is unavailable, retain and report its reason.

Bootstrap the selected OLS or logistic regression

Return to the OLS or binary-logistic setup you intend to assess. Keep its outcome coding, predictor list, controls and intercept choice. Set Bootstrap inference to Case-resampling bootstrap, then enter Bootstrap samples, Parallel workers and Seed. A 1000-draw setup is a concrete teaching choice. Choose Start calculation and open Regression bootstrap summary before the coefficient and interval tables. Assess the actual usable count and interval stability rather than assuming that this count is sufficient for every purpose.

Each draw resamples cases with replacement and refits that regression. In a logistic analysis, a resample can lose a response class or become separated. In OLS, a resample may not contain enough independent information to estimate the specified coefficients. Read requested, usable and failed counts and the reasons for failures. A high failure rate is a finding about instability, not something to hide by quoting only successful draws.

Percentile and eligible BCa intervals describe resampling uncertainty. Analytical point-fit tests use a different calculation. Report the named interval and its settings instead of treating these as interchangeable decisions. If BCa is unavailable because its required calculations failed, record that status; do not silently insert bounds from another method.

This bootstrap is specific to the regression you selected. It is not PLS resampling. If an indirect effect depends on several linked equations, use the supported PROCESS-system bootstrap so all required equations are refitted together.

Explore OLS importance and performance together

Regression importance-performance map analysis, or IPMA, puts two quantities on one map. Importance is a predictor's or control's signed, unstandardized OLS coefficient. Performance is its average position within a declared range, expressed from 0 to 100. Both come from the same complete cases.

Use the map for a continuous outcome when the scale endpoints have a defensible meaning. Unstandardized means the coefficient retains the variables' original units. A different unit can change its magnitude, so the horizontal position is not a unit-free ranking of what matters most.

Specify the outcome, predictors and controls first. Then record meaningful lower and upper endpoints and any reversed interpretation of performance. Inspect negative coefficients before translating a position into advice: higher values of a predictor can be associated with a lower outcome under the fitted model.

  1. Specify the OLS model

    Open Regression and choose Ordinary least squares. Set the intended Outcome variable, Predictors and Controls.

  2. Enable the map

    Under Importance-performance analysis select Include regression IPMA. The selected outcome becomes the target of the map.

  3. Enter defensible ranges

    Review the range editor for every predictor and control. Supply meaningful bounds that contain the observed values, and record any reverse interpretation. A convenient range chosen only to improve a plotted position has no substantive justification.

  4. Assess the regression before using its map

    Calculate, then read coefficients, intervals, model fit and relevant diagnostics. The map uses that fitted equation and cannot correct a poor specification.

  5. Read coordinates with their supporting tables

    Examine the three IPMA tables and paired map. Check coefficient units and signs, declared ranges and the analysed sample. Performance is a range-based summary of those cases.

On a small screen, swipe the table sideways to see every column.

OutputHow to read itWhat to check
Signed importanceRead the unstandardized coefficient in its original unit and direction.Different input units alter coefficient magnitudes.
PerformanceRead the position from 0 to 100 within the stated range.A rescaled performance value is not a probability.
Paired mapUse both axes to identify questions for further investigation.The plot does not establish that a feasible intervention will produce the implied outcome change.

Read an importance-performance map without inventing priorities

Regression IPMA is available for OLS. It pairs each signed unstandardized coefficient with a performance position on a declared 0-to-100 range. Establish that the underlying regression is meaningful first, because the map uses that equation rather than repairing it.

Under Importance-performance analysis, select Include regression IPMA. Review the range editor for every predictor and control and enter defensible bounds containing its observed values. The synthetic x, z and m columns do not have substantive performance endpoints. Any bounds assigned for this exercise are illustrative and cannot justify management recommendations.

Consider separate hypothetical arithmetic: a predictor has a defensible 0-to-10 scale and mean 4. Its performance becomes 40 on the 0-to-100 display. If its unstandardized coefficient is 0.30, its importance coordinate is 0.30, with that sign preserved. Performance 40 is a range position, not a probability. Coefficient 0.30 still depends on the predictor's unit.

Read the three IPMA tables with the paired map. High positive importance and low performance can frame a question for further investigation. Check scale comparability, whether a change is feasible, and possible confounding before proposing an intervention. The OLS option should not be presented as a logistic or PROCESS IPMA result.

Check neighbouring residuals when row order has meaning

Residual autocorrelation means that errors at nearby positions in an ordered dataset are related. The Durbin-Watson statistic compares differences between adjacent regression residuals with their overall variation. First-order dependence concerns adjacent positions, such as successive times in an appropriately ordered study.

Use this check only when the observation order has a meaningful interpretation. QuickPLS follows the original row order among complete cases. Sorting the file differently can therefore change the question. Explain why neighbouring rows belong together before interpreting the statistic.

The optional probability calculation treats predictor values as fixed and assumes Gaussian errors with equal variance. Gaussian means normally distributed, or bell-shaped. The conditional procedure calculates the reference for the fixed design; the normal-moment method approximates that reference using its moments. These assumptions and procedures must be stated alongside the result.

  1. Confirm a meaningful observation order

    Specify the intended OLS model and preserve the original ordered observations. Check how omitted incomplete rows affect which observations become neighbours.

  2. Request the probability

    Under Residual autocorrelation select Include Durbin-Watson probability. The statistic and its probability require different interpretation: the latter depends on the selected assumptions and procedure.

  3. Choose the alternative before inspecting results

    Set Autocorrelation alternative to Either direction, Positive autocorrelation or Negative autocorrelation. Positive dependence tends to put similar residuals together; negative dependence tends toward alternating signs.

  4. Choose Probability procedure

    Conditional Gaussian supports up to 512 cases. The automatic option uses the conditional procedure below 100 cases and a normal-moment approximation otherwise. Record the procedure actually used.

  5. Confirm the null assumptions honestly

    Set Null assumptions to match the study. The null is the reference hypothesis for the test. Unconfirmed or unsupported choices leave its probability unavailable; robust coefficient standard errors do not establish these assumptions.

  6. Read the status and statistic together

    Calculate and inspect the statistic, probability method and result status. Keep any unavailable reason in the report. An unavailable probability is not a zero and does not establish absence of dependence.

On a small screen, swipe the table sideways to see every column.

OutputHow to read itWhat to check
Durbin-Watson statisticRead changes between adjacent residuals relative to their overall variation, in the analysed row order.Reordering observations changes the question.
Probability procedureReport conditional Gaussian versus normal-moment approximation.State which procedure was used; conditional and approximate probabilities can differ.
Availability and assumptionsState the null hypothesis being tested and why any probability could not be calculated.An unavailable probability is not zero or nonsignificant.

Use ordered-residual checks for an ordered research question

Durbin-Watson uses differences between neighbouring residuals, so observation order is part of the analysis. The synthetic workshop rows are not a documented time series. A probability calculated from this file would therefore not establish time dependence in a real research process.

For an appropriately ordered OLS study, preserve the original order among complete cases. Under Residual autocorrelation select Include Durbin-Watson probability. Choose Autocorrelation alternative as Either direction, Positive autocorrelation or Negative autocorrelation before viewing the result.

Choose Probability procedure. Conditional Gaussian supports up to 512 cases; the automatic option uses the conditional procedure below 100 cases and the normal-moment approximation otherwise. Confirm Null assumptions only when it is defensible to treat the predictors as fixed and the errors as Gaussian with equal variance. HC3 coefficient standard errors do not establish those assumptions.

A statistic near 2 is a descriptive reference, not a universal pass. A lagged outcome predictor or unsuitable null assumptions puts the probability outside this procedure's scope. If the probability is unavailable, report the reason alongside the statistic. That status is neither zero nor evidence that dependence is absent.

Prepare a subgroup or an equal-weight score for PROCESS

Use these options when your question concerns a specified subgroup, or when you have a theory-based reason to combine indicators into a mean or sum. An equal-weight score gives every selected indicator the same arithmetic weight after the chosen preparation. It remains an observed constructed variable; the model does not estimate a latent factor behind it.

Record the group column, exact value and value type. A number and text that looks like that number are different stored values. Also record each score name, its indicators, combination rule and scale choices. These details determine which cases and variables the model analyses.

QuickPLS selects complete source rows before constructing scores. It then applies the requested final metric, meaning the scale used for the model variables. Subgroup selection changes the cases used for scoring, scaling and resampling, so two subgroup analyses can differ before any paths are estimated.

  1. Open the preparation controls

    In Regression / PROCESS choose Configure groups, data metrics, scores and copulas.

  2. Set the subgroup if needed

    Under PROCESS extended options choose Analysis group and Exact group value, or retain All cases. Match the stored type and value rather than selecting a group by its appearance alone.

  3. Define how to combine indicators

    Choose Add equal-weight score. Enter Score name, Combine indicators and Indicator metric before combining. The available combination rules are an equal-weight mean or sum.

  4. Select source indicators and assign the score

    Choose at least two Source indicators. Then explicitly select the new score in the relationship editor. Creating a score does not automatically put it in an equation.

  5. Choose the final scale

    Set Final variable metric to Raw, Mean centered or Standardized (sample SD). Raw keeps the original units; centering subtracts the mean; standardizing also divides by the sample standard deviation. Calculate the graph with the intended choice.

  6. Check cases and the meaning of the scores

    Read case counts and constructed-score details before interpreting paths. Read coefficients and reported moderator probes on the final metric. Binary moderators retain their exact 0/1 coding.

On a small screen, swipe the table sideways to see every column.

OutputHow to read itWhat to check
Analysis group and exact valueIdentify exactly which subgroup was included.Numeric 1 and text 1 are different typed values.
Score recipeState whether the score is a mean or sum, which indicators it uses and how they were scaled.Different scoring choices change the variable being analyzed.
Final metric and probesRead coefficients and the chosen moderator values on the final scale after any transformations.Binary moderators retain 0/1 coding and are not converted into standardized continuous variables.

Practise subgroup selection and score construction separately

For this separate exercise, switch to research-workshop.csv. In Regression / PROCESS open Configure groups, data metrics, scores and copulas. Under PROCESS extended options choose Analysis group and Exact group value, or retain All cases. Numeric 1 and text 1 are different typed values; match the data's stored value and type.

Choose Add equal-weight score. Enter Score name, Combine indicators and Indicator metric before combining, then select at least two Source indicators. For example, define a Quality mean from quality_1, quality_2 and quality_3 using the arithmetic-mean rule. Select the new score in the relationship editor; defining it alone does not assign it to an equation.

Set Final variable metric to Raw, Mean centered or Standardized (sample SD). Complete source rows are selected before the score is constructed. The chosen subgroup determines the cases used for scoring, scaling and resampling. Binary moderators keep their exact 0/1 coding instead of becoming standardized continuous values. Read moderator probes in the final reported metric.

The equal-weight score is an observed constructed variable, not an estimated latent factor. The subgroup coefficients describe the fitted relationships within that selected group. Separate fits for group 0 and group 1 do not themselves test a between-group difference. That comparison needs its own supported procedure; significance in one group and not the other is not a test of the difference.

Consider equation-specific controls for possible endogeneity

Adjusted Gaussian copula controls are an advanced option for specified PROCESS equations. They add constructed control terms under particular distributional and identification assumptions. Identification here means having a defensible basis for separating the relationship of interest from the endogeneity problem. Read the method's assumptions before using the adjustment.

A predictor is potentially endogenous when it is related to unmeasured influences in the same outcome equation. An exogenous predictor is treated as unrelated to those unmeasured influences under the model assumptions. A coefficient changing after an adjustment does not, by itself, establish that the original predictor was endogenous.

Complete the graph first. For each affected equation, decide which regressors, meaning variables on the predictor side, are continuous endogenous, continuous exogenous or discrete exogenous. Discrete variables take categories or distinct levels. A variable's role can differ across equations, so each assignment needs its own research argument.

  1. Finish the PROCESS graph

    Complete the relationships, then open Configure groups, data metrics, scores and copulas. Identify the equations for which an adjustment is justified.

  2. Enable the equation-specific adjustment

    Under Adjusted Gaussian copula controls select Specify potentially endogenous continuous regressors.

  3. Choose the affected outcome equations

    For each relevant Equation select Add controls to the named outcome. This assignment is specific to that equation.

  4. Declare each regressor's role

    Choose Continuous endogenous, Continuous exogenous or Discrete exogenous as justified. Binary regressors must be discrete exogenous. Check all roles instead of assuming that one equation's assignment applies everywhere.

  5. Request uncertainty from complete refits

    Enable Case-resampling bootstrap and record its settings. The adjusted uncertainty requires the relevant raw-case refits, including reconstruction of the generated controls.

  6. Read adjusted uncertainty separately

    Calculate and distinguish the full-refit bootstrap intervals from standard errors conditional on the fitted model and from plot bands. Point-fit diagnostics examine the fitted conditional model; they do not include all the uncertainty of reconstructing the adjustment.

On a small screen, swipe the table sideways to see every column.

OutputHow to read itWhat to check
Equation and regressor rolesIdentify where the control is added and which variable is treated as endogenous.State each predictor's role separately in each regression equation.
Point-fit diagnosticsUse them to inspect the fitted conditional model.They do not provide corrected uncertainty by themselves.
Bootstrap intervalsUse intervals from the full raw-case refit with reconstructed controls.Report usable and failed model fits. A confidence interval alone does not establish the assumptions needed to identify the effect.

Specify an adjusted-copula sensitivity analysis carefully

In a completed PROCESS graph, adjusted Gaussian copula controls can be added to equations where a continuous predictor may be endogenous. Endogeneity means association with unmeasured influences in that equation. Give a research reason for this concern and for the adjustment's assumptions. A coefficient changing after adjustment does not diagnose the problem by itself.

Open Configure groups, data metrics, scores and copulas. Under Adjusted Gaussian copula controls choose Specify potentially endogenous continuous regressors. For each affected Equation, select Add controls to its named outcome and assign Continuous endogenous, Continuous exogenous or Discrete exogenous roles. Binary regressors must be discrete exogenous.

As a teaching sensitivity exercise, you could treat x as potentially endogenous in the y equation and state the role assigned to z. This explores an assumption; it is not evidence that the CSV contains the claimed endogeneity problem. Review roles separately for each equation because the assumed relationship with unmeasured influences can differ.

Enable Case-resampling bootstrap for the matching adjusted uncertainty. Each raw-case refit rebuilds the generated controls. Read those full-refit intervals separately from standard errors conditional on a single fitted model and from plot bands. A finite adjusted estimate does not establish identification or prove that omitted-variable bias has been removed. Report the assumptions and compare the substantive conclusion, not merely which version has a smaller p-value.

Calculation comparisons

Further reading

Related guides