Mediation, Moderation, and Conditional Process Models (Part 1)
Week 9: March 3, 2025
Reading
Hayes, Andrew. (2018). Introduction to Mediation, Moderation, and Conditional Process Analysis Chapters 1 - 4.
Here is an applied paper in Social Work that you should be able to understand after going through this week’s materials.
Introduction to the Topic
This week, we explore mediation analysis, a statistical approach used to understand the mechanisms through which an independent variable influences a dependent variable via a third variable, known as the mediator. Mediation analysis is essential for uncovering causal pathways in research.
Key Concepts:
- Direct Effects: The relationship between the independent variable and the dependent variable, excluding the mediator.
- Indirect Effects: The portion of the relationship explained through the mediator.
- Total Effects: The combined impact of direct and indirect effects.
- Bootstrapping: A resampling method for testing the significance of indirect effects.
Relevance:
- Students will learn how to identify and test mediating variables in a causal framework. Make sure you review our discussion of confounding
- Students will explore how to decompose total effects into direct and indirect components to better understand relationships among variables.
Why This Is Important:
- Mediation analysis allows researchers to move beyond simple relationships to uncover how and why effects occur.
- Understanding mediation is critical for testing theoretical models in fields like psychology, sociology, and public health.
How This Ties Into the Overall Course:
- Builds upon previous topics, such as regression and effect sizes, by extending these tools to explore causal pathways.
- Prepares students for advanced concepts like moderated mediation and structural equation modeling (SEM), where mediation analysis is a core component.
By the end of this week, students will be able to conduct mediation analyses, interpret direct and indirect effects, and evaluate the significance of mediators using bootstrapping methods.
An example of logistic regression from last week
We ran out of time last week but I put together an example and write up of logistic regression. This uses the PRAMS dataset to inquire about whether stress during pregnancy predicts IPV exposure during pregnancy. Recall the variable measurements which we noted here. The JASP file is here and it is fully annotated.
In-Class Files and Data Sets
A Note on Linear Transformations
Linear Transformations: We start class today with a quick example of how to transform variables when the model assumptions are violated. As I mentioned in class, this trick has almost never worked with the datasets I use. However, I was successful in transforming the dependent variable once, using a cultivated dataset on area deprivation, housing, and “child maltreatment” substantiations which can be accessed here. I have used these data often see Elise Barboza-Salerno (2024) for an example.
The cultivated dataset comes from many sources. The H+T index comes from this website. The ADI comes from the sociome package in R, and we saw an example when we learned how to quantify effect sizes with Cohen’s D. I calculated the distances to SNAP retail locations from home addresses based on information from the SNAP retail locator, which can be accessed here.
Test yourself on partial mediation, full mediation, and supression: I created sample output for each effect, can you select the correct model that illustrates each mechanism?
Mediation: We will use a subset of the NSCAW I to examine whether symptoms of post-traumatic stress mediate the association between exposure to violence at Wave I and child externalizing behaviors at Wave III. Now DON’T LOOK at the model write-up until AFTER you have the analysis done. Then, and only then, can you take a gander at my write-up here
Lab Files
After we do the above example together, we have an in-class assessment to get a sense of how well you are comprehending the analyses. This includes some multiple choice questions along with an analysis of the Adolescent Health Survey Data which is a longitudinal dataset that has been collected since about 1995 when youth were 15 years of age. Please download the assessment here. See Elise Barboza & Siller (2021) for a similar analysis published in the Journal of Interpersonal Violence, or this paper Barboza (2020) that also used these data.
Lecture Notes
- Download today’s slides here
R Code
I wrote the code to show you how to use PROCESS in R. Yes, R has a package that runs the same macro that SPSS can run. The example is based on the NSCAW dataset as well. Check it out here
Resources
This is an amazing resources from UCLA on introduction to mediation, moderation and conditional process models. The website has a tutorial that I am strongly suggesting you do, and also additional powerpoint slides for Andrew Hayes’ book.
Additional Notes
Stay calm and do everything in moderation.