8  Moderation and Mediation

8.1 Learning outcomes

After viewing the tutorial materials and following along with the demonstration, you can:

  1. Set-up, run and interpret moderation and mediation (regression) models

8.2 Datasets

The moderation demonstration uses the dataset video_games which was prepared by Andy Field and included in Field, van Doorn and Wagenmakers (2025). The dataset includes the variables Aggression (DV), Video games (hours per week) (IV1), and Callous Unemotional Traits (IV2/Moderator).

The mediation demonstration uses the dataset lambert_2012 which is based on data from the study of Lambert et al. (2012) on pornography use and infidelity, and is included in Field, van Doorn and Wagenmakers (2025). IV1 is Porn consumption (log-transformed), IV2 (the mediator) is Relationship commitment, and the DV is Physical infidelity.

8.3 Videos