In mediation analysis between an exposure X and an outcome Y, estimation of the direct effect of X on Y by usual regression after adjustment for the mediator M may be biased if Z is a confounder between M and Y, and is also affected by X. Alternative methods have been described to avoid such a bias: inverse probability of treatment weighting with and without weight truncation, the sequential g-est