Mediation
Splitting an effect into the part that runs through an intermediate and the part that does not
What it answers
How much of a score's effect on an outcome runs through an intermediate variable, and how much does not.
What comes back
Exactly three rows per fit: the indirect effect through the mediator, the direct effect that does not, and the total.
How it is fitted
Two models — one for the mediator, one for the outcome — and then a simulation-based decomposition from the mediation package, which is an optional dependency you install yourself.
The draws are quasi-Bayesian Monte Carlo simulations with sandwich standard errors, not a bootstrap. A true bootstrap is available by passing the relevant argument through.
Standard errors come from the spread of those draws, and the confidence level you ask for is honoured.
The p-value is the simulation's own and is deliberately never recomputed from the estimate and its standard error.
What it will not give you
No proportion-mediated row. That quantity is a ratio of two correlated estimates, unstable when the total effect is near zero, and cannot be pooled. Form it yourself from the indirect and total rows if you must, and know that a confidence interval for it is not available from the pooled object.
The method argument is a label, not a switch. Both values fit the same models. It is recorded on the row and used when pooling, but it does not change the estimate.
Three structural limits: the mediator model is always linear, so no binary or ordinal mediator; the outcome is continuous or binary, so no survival mediation; and the formulae contain no exposure-by-mediator interaction, so no moderated mediation.
Reading it honestly
The three rows are adjusted among themselves, and the method is fixed rather than configurable. Whether adjusting across three deterministically related quantities is what you want is a judgement — the total is the sum of the other two.
Identification is an assumption, not an output. No unmeasured confounding of the exposure-mediator-outcome relationships, correct temporal ordering, and no measurement error in the mediator. PolyGenius cannot check any of them.
For multi-cohort work the decomposition pools per effect type, but nothing verifies that the exposure, mediator and covariate set were coded the same way in each cohort.