Binary-Outcome Mediation

Verified

Mediation (legacy hub)

Independently verified. Every statistic this test reports has been re-derived against an independent reference — never the library the pipeline itself calls — the rendered output was read back in a browser, and the result is locked with a committed regression suite.

Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.

Loading teaching datasets…

Or use your own dataset

Loading your datasets…

Mediation analysis when the outcome is binary (yes/no) — indirect effects on an odds / probability scale.

Handles mediation with a dichotomous outcome using logistic models, reporting indirect effects with bootstrap CIs on an appropriate (odds-ratio or probability) scale.

Worked example

Does stress raise the risk of dropout via burnout?

Stress → burnout → dropout (yes/no) was tested with binary-outcome mediation (logistic, 5,000 bootstraps, n = 350).

Result

Burnout significantly mediated the stress→dropout risk (indirect effect on the log-odds scale = 0.27, 95% CI [0.12, 0.46]).

How you'd report it (APA)

Burnout significantly mediated the effect of stress on dropout risk (indirect = 0.27, 95% CI [0.12, 0.46]).

Try it yourself: Load this ready-made sample and follow the run above.

When to use it

  • The outcome is yes/no
    Dropout vs stayed, relapsed vs not, passed vs failed — anything dichotomous. e.g. stress → burnout → dropout(y/n).
  • The mediator is continuous or binary
    M feeds a logistic model for Y; the X→M path is a linear or logistic regression as appropriate.

When NOT to — use instead

Hypotheses

H₀: the indirect effect of X on the binary outcome Y through M is zero (on the log-odds / probability scale).
Hₐ: the indirect effect is non-zero. Because the outcome model is logistic, the effect is reported on an odds or probability scale with a bootstrap CI; mediation holds when that CI excludes 0.

Parameter tested: the indirect effect on the log-odds (or a probability-scale contrast), with a percentile bootstrap CI

Assumptions (and what to do if they fail)

Scale of the indirect effect is statedhigh

Check: Odds-ratio and probability-scale indirect effects are not the same number — report which one you mean.

If violated: Readers mis-read the magnitude; a log-odds indirect effect looks larger than the probability-scale effect it implies.

Correct causal order and no unmeasured confoundinghigh

Check: As in any mediation — X before M before Y, and no omitted common cause of M and Y.

If violated: The indirect effect is biased regardless of the outcome scale.

Enough events (not just enough cases)medium

Check: Logistic models need a reasonable number in the rarer outcome category.

If violated: Sparse events give unstable b paths and very wide bootstrap CIs.

Ready to run a Binary-Outcome Mediation on your own data?

Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.

Run this test →