Tutorials in Quantitative Methods for Psychology (Apr 2018)

A computational description of simple mediation analysis

  • Caron, Pier-Olivier,
  • Valois, Philippe

DOI
https://doi.org/10.20982/tqmp.14.2.p147
Journal volume & issue
Vol. 14, no. 2
pp. 147 – 158

Abstract

Read online

Simple mediation analysis is an increasingly popular statistical analysis in psychology and in other social sciences. However, there is very few detailed account of the computations within the model. Articles are more often focusing on explaining mediation analysis conceptually rather than mathematically. Thus, the purpose of the current paper is to introduce the computational modelling within simple mediation analysis accompanied with examples with R. Firstly, mediation analysis will be described. Then, the method to simulate data in R (with standardized coefficients) will be presented. Finally, the bootstrap method, the Sobel test and the Baron and Kenny test all used to evaluate mediation (i.e., indirect effect) will be developed. The R code to implement the computation presented is offered as well as a script to carry a power analysis and a complete example.

Keywords