Mediation analysis: a comparison of structural equation modelling and causal inference approaches