Mediation and Moderation Analysis using R
Course Info
This course includes 1 attempt.
Understanding why and when relationships between variables occur is central to quantitative social science. This course on Mediation and Moderation Analysis using R provides a complete, hands-on introduction to the two frameworks that allow researchers to uncover both mechanisms (mediation) and contextual effects (moderation). You will learn how to identify, estimate, and interpret direct, indirect, and interaction effects using modern statistical tools and real-world data.
Mediation analysis focuses on how one variable influences another through an intermediate mechanism — for example, how education affects health through income or wellbeing. Moderation analysis examines when or for whom an effect is stronger or weaker — for instance, whether the relationship between stress and health depends on gender or social support. Together, these methods reveal the structure of causal processes and provide deeper insights than simple regression models.
The course begins with the conceptual foundations of mediation and moderation, then progresses to advanced applications including path analysis, structural equation modeling (SEM), longitudinal mediation, multi-group analysis, and causal mediation frameworks. You will learn to use R packages such as lavaan
, mediation
, and interactions
to estimate, visualise, and interpret these models.
Each lesson combines short video lectures, illustrated slides, and clear explanations with practical exercises based on real wold data — ensuring that all examples reflect realistic social research. Practical sessions guide you step-by-step through model estimation, diagnostics, and interpretation. Every exercise includes downloadable datasets, solutions, and R scripts, allowing you to replicate analyses and learn by doing.
By the end of the course, you will:
- Understand the logic and assumptions of mediation and moderation analysis.
- Estimate and interpret interaction and mediation models using R.
- Learn how to estimate moderation with the Johnson–Neyman method.
- Build path models and SEMs to capture direct, indirect, and total effects.
- Extend analyses to longitudinal and causal mediation frameworks.
- Conduct and interpret sensitivity analyses to assess robustness.
- Visualise and communicate results effectively through plots and model diagrams.
This course is designed for researchers, students, and analysts in the social, behavioural, and health sciences who already have basic familiarity with regression analysis and want to deepen their methodological toolkit. Whether you are working with survey data, experiments, or observational studies, you will gain the skills to design stronger studies, interpret results rigorously, and understand the mechanisms that drive social and behavioural outcomes.
Join the course to build a robust understanding of mediation and moderation analysis using R, and learn how to apply these techniques to your own research using transparent, reproducible, and data-driven methods.
Course Material
- Course Overview
- Lesson 1: Intro to Mediation and Moderation
- Quiz
- Lesson 2: Mederation Analysis
- 2.1 Exploring Moderation Effects
- 2.2 Estimating Moderation Effects
- Quiz
- Practical 1 – Moderation Analysis
- Practical Materials
- Practical Solution
- Lesson 3: Mediation Analysis
- 3.1 Introduction to Path Analysis
- 3.2 Mediation Using Path Analysis
- 3.3 Longitudinal Mediation
- 3.4 Mediated Moderation
- 3.5 Causal Mediation
- Quiz
- Practical 2 – Mediation Analysis
- Practical Materials
- Practical Solution
- Further Reading
Instructors
Alexandru Cernat is a professor in the social statistics department at the University of Manchester. He has a PhD in survey methodology from the University of Essex and was a post-doc at the National Centre for Research Methods and the Cathie Marsh Institute. His research and teaching focus on: survey methodology, longitudinal data, measurement error, latent variable modelling, new forms of data and missing data. He am also the founder of longitudinalanalysis.com, a platform that helps researchers and analysts learn to collect, clean, and analyse longitudinal data. You can find out more about him and his research at: alexcernat.com.
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them