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
NumberEnter a proportion strictly between 0 and 1, such as 0.95 for a 95% confidence interval. Controls simulation-based effect intervals.
X
ColumnNumeric exposure. The reported contrast is fixed at 0 to 1; verify that it is meaningful on your scale.
Mediator
ColumnNumeric mediator modeled with linear regression on exposure and covariates.
Y
ColumnContinuous numeric outcome for linear, or numeric 0/1 outcome for logistic.
Covariates
Multiple columnsOptional numeric adjustment variables in both models. All selected columns must be distinct.
Outcome model
Choicelinear uses a continuous outcome model; logistic uses a binomial model requiring both 0 and 1 to be observed.
- linear
-
linear - logistic
-
logistic
Simulation
Choiceparametric simulates model parameters; bootstrap refits resampled observations. Both use the requested replications and seed 42.
- parametric
-
parametric - bootstrap
-
bootstrap
Simulations
IntegerNumber of replications, from 50 to 1,000. Larger values increase calculation time.
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.
| 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.