← All documentation

Mediation analysis

Explore a proposed mediator between an exposure and outcome under an explicitly specified causal model.

Data requirements

Use distinct numeric exposure, mediator, outcome and optional covariate columns, with 10–1,000 complete observations.

Upload UTF-8 CSV or TSV with unique column names in the first row. Blank, NA, N/A, NaN and NULL entries are treated as missing. Files support up to 2 MiB, 10,000 rows, 60 columns and 200,000 cells; module-specific limits also apply.

Parameters

Names match the analysis form. Starting values describe a newly loaded form; column selections depend on your uploaded data. Matching example column names may be preselected. Review every selection before running.

“Optional / conditional” fields may be required by a particular mode or method. The explanation states when each field takes effect. Hold Ctrl / Command to select multiple columns.

Confidence level

Number

Enter a proportion strictly between 0 and 1, such as 0.95 for a 95% confidence interval. Controls simulation-based effect intervals.

Input
Required
Starting value
0.95

X

Column

Numeric exposure. The reported contrast is fixed at 0 to 1; verify that it is meaningful on your scale.

Input
Required
Starting value
Depends on the uploaded columns; review the selection.

Mediator

Column

Numeric mediator modeled with linear regression on exposure and covariates.

Input
Required
Starting value
Depends on the uploaded columns; review the selection.

Y

Column

Continuous numeric outcome for linear, or numeric 0/1 outcome for logistic.

Input
Required
Starting value
Depends on the uploaded columns; review the selection.

Covariates

Multiple columns

Optional numeric adjustment variables in both models. All selected columns must be distinct.

Input
Optional / conditional
Starting value
Depends on the uploaded columns; review the selection.

Outcome model

Choice

linear uses a continuous outcome model; logistic uses a binomial model requiring both 0 and 1 to be observed.

linear
linear
logistic
logistic
Input
Required
Starting value
linear

Simulation

Choice

parametric simulates model parameters; bootstrap refits resampled observations. Both use the requested replications and seed 42.

parametric
parametric
bootstrap
bootstrap
Input
Required
Starting value
parametric

Simulations

Integer

Number of replications, from 50 to 1,000. Larger values increase calculation time.

Input
Required
Starting value
200
Allowed range
≥ 50; ≤ 1000

Example settings

Load the bundled example in the analysis workspace, or upload the example CSV linked above, then use these settings. These are illustrative choices for the synthetic data.

Mediation analysis — bundled example settings
Parameter Setting
Confidence level 0.95
X x
Mediator mediator
Y y
Covariates z
Outcome model linear
Simulation parametric
Simulations 200

Results

The mediation table reports ACME, ADE, total effect and proportion mediated with simulation-based inference. The figure summarizes selected effect estimates. Additional downloadable analysis-summary and diagnostics tables describe the analysis scope and method checks. Selected-variable missingness is reported where applicable. Diagnostics do not establish external validity or verify untested assumptions.

Review the reported method, observation count and notes alongside the estimates. Result tables can be downloaded as CSV and the figure as PNG.

Notes & limitations

  • Rows missing any selected column are excluded. Causal interpretation requires a justified causal model and sequential ignorability; observational associations alone do not establish mediation.
  • Constant outcomes, effectively zero regression residual variation, model separation and failed simulation fits are rejected. Undefined proportions mediated are flagged separately from otherwise valid direct and indirect effects.