Free course

Intro to Statistics with R: Moderation and Mediation

Start Free Course
4 Hours11 Videos42 Exercises25,419 Learners
2750 XP

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA. You confirm you are at least 16 years old (13 if you are an authorized Classrooms user).

Loved by learners at thousands of companies

Course Description

Moderation and mediation sound alike, but in reality they are quite different. This course will get you acquainted with these complex analytical techniques based on multiple regression. Special attention will go to centering predictors as a way to improve interpretability of results.

  1. 1

    An introduction to moderation


    In this chapter professor Conway will give an introduction to the concepts behind moderation while you will walk through an example. You will define models with and without moderation, and study the difference in performance between these. Furthermore, it will be illustrated how you can visualize the effects of moderation.

    Play Chapter Now
    Introduction to moderation
    50 xp
    Data exploration
    100 xp
    Conclusion results
    50 xp
    Use of moderation
    50 xp
    Calculate correlations
    100 xp
    What do the correlations tell you?
    50 xp
    Moderation model
    50 xp
    Model with and without moderation
    100 xp
    Model without moderation
    50 xp
    Model with moderation
    50 xp
    How to test for moderation
    50 xp
    Model comparison
    100 xp
    Conclusion model comparison
    50 xp
    100 xp
    Scatterplot: Interpretation
    50 xp
  2. 2

    An introduction to centering predictors


    Centering predictors means to take your predictor variable and to put it in deviation form. Centering predictors makes the interpretation of a moderation analysis much simpler, but unfortunately it often is a tedious work. The chapter will focus on the conceptual part behind centering, as well as doing the calculations in R.

    Play Chapter Now
  3. 3

    An introduction to mediation


    Just like moderation, mediation is a multivariate approach as well. The mediator variable is designed to account for, or to explain the relationship between a predictor and an outcome. You will learn how to do a mediation analysis via a series of multiple regressions, which is the standard approach. The techniques to conduct a mediation analysis in R are illustrated as well.

    Play Chapter Now
Andrew Conway Headshot

Andrew Conway

Andrew Conway is a Psychology Professor in the Division of Behavioral and Organizational Sciences at Claremont Graduate University in Claremont, California. He has been teaching introduction to statistics for undergraduate students and advanced statistics for graduate students for 20 years, at a variety of institutions, including the University of South Carolina, the University of Illinois in Chicago, and Princeton University.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA