Download presentation
Presentation is loading. Please wait.
Published byLionel Randall Modified over 7 years ago
1
Mediation and Moderation: Modern Methods and Approaches
Alexander M. Schoemann Department of Psychology East Carolina University Introduction and Basic Mediation
2
Let’s get to know each other
Alex Schoemann PhD in Social and Quantitative Psychology from KU in 2011 Postdoctoral Researcher at the Center for Research Methods and Data Analysis at KU Assistant Professor of Psychology at East Carolina University Research focuses on latent variable modeling (SEM & MLM), missing data, and intergroup relations Introduction and Basic Mediation
3
Introduction and Basic Mediation
Overview: Page 1 Introductions Who’s here? Mediation vs. moderation Software overview Regression review Correlation and covariance Simple linear regression Multiple linear regression Categorical predictors Other types of regression (e.g. logistic regression) Introduction and Basic Mediation
4
Introduction and Basic Mediation
Overview: Page 2 Basic mediation in regression Fitting the mediation model Testing indirect effects Effect sizes Pitfalls (suppressor variables, concurrent data) Special topics in mediation Latent variables Multiple mediation Logistic mediation Mediation in multilevel modeling Longitudinal mediation Introduction and Basic Mediation
5
Introduction and Basic Mediation
Overview: Page 3 Basic moderation in regression Fitting the moderation model Graphing the interaction Simple slopes & regions of significance Interpretation Continuous vs. categorical moderator Centering? Special topics in moderation Multiple moderators Moderation in multilevel modeling Latent variable moderation Quadratic moderation & Polynomial relationships Introduction and Basic Mediation
6
Introduction and Basic Mediation
Overview: Page 4 Hybrid models of mediation and moderation Conditional process models Mediated moderation Moderated mediation Other hybrids Introduction and Basic Mediation
7
Introduction and Basic Mediation
Course Materials All course materials should be posted on the Stats Camp website This includes All slides Example data (mostly SPSS) Example syntax (mostly SPSS) Introduction and Basic Mediation
8
Introduction and Basic Mediation
Software This course will extensively use the PROCESS macro for SPSS and SAS (Hayes, 2014) Available from: SPSS users have the option of using either syntax or creating a drop down menu We will use syntax in this course SAS users must have SAS IML to use the macro Introduction and Basic Mediation
9
Introduction and Basic Mediation
Software The nice thing about PROCESS is that the input and output for SPSS and SAS are almost the same. For more complex analyses we will use other software e.g. Mplus for SEM If you have a question about other software packages (e.g. R, LISREL) I’ll try to answer it in the afternoon help sessions Introduction and Basic Mediation
10
Why a course in mediation and moderation?
Both topics address complex research questions. Not just does X predict Y but… Why does X predict Y? (mediation) When does X predict Y? (moderation) Both topics address conditional effects The relationship between two variables is influenced by a third variable Introduction and Basic Mediation
11
Why not a course in mediation and moderation?
Despite the similarities mediation and moderation are two very different process. They answer different questions They make different assumptions They use different analytic strategies So why are we talking about them together? They both start with M? Baron and Kenny wrote an article about them in 1984? Let’s define mediation and moderation before moving on Introduction and Basic Mediation
12
Mediators and moderators
X Y mediator X Y moderator Introduction and Basic Mediation
13
Introduction and Basic Mediation
Mediator vs. Moderator Mediator: middle-person, letter carrier, delivery agent X M Y Key word: because Moderator: “changer” variable that alters the strength of another relationship (i.e. an interaction!) Moderation occurs when the effect of X on Y depends on Z Key word: depends Introduction and Basic Mediation
14
Introduction and Basic Mediation
Regression overview Much of this class will focus on regression as the analysis of choice SEM and MLM can be thought of as “fancy” version of regression It is important that everyone is on the same page when it comes to regression basics The next few slides will review correlation and regression before we get into mediation and moderation Introduction and Basic Mediation
15
Introduction and Basic Mediation
Regression overview Say we have two variables, x and y. We might want to explore their characteristics with histograms and sample statistics. Each variable’s marginal characteristics Introduction and Basic Mediation
16
Introduction and Basic Mediation
Regression overview Introduction and Basic Mediation
17
Introduction and Basic Mediation
Regression overview We could also explore their joint characteristics with a scatter plot and measures of association. Introduction and Basic Mediation
18
Introduction and Basic Mediation
Regression overview We could estimate a covariance or correlation to characterize the degree of linear relationship between x and y: Introduction and Basic Mediation
19
Introduction and Basic Mediation
Regression overview Or we could do the same thing with regression using the intercept and slope. Values of the intercept and slope are determined by the least squares criterion. The values of the intercept and slope that minimize the squared distance between each point and the regression line. Introduction and Basic Mediation
20
Introduction and Basic Mediation
Regression overview The simplest regression equation. By the least square criterion the value of that minimizes the square residuals is the mean of y. Introduction and Basic Mediation
21
Introduction and Basic Mediation
Regression overview We can explain more variance in y by including x as a predictor of y. Introduction and Basic Mediation
22
Introduction and Basic Mediation
Regression overview We can include additional predictors of y. With two predictors we are now searching for a plane of best fit. Introduction and Basic Mediation
23
Introduction and Basic Mediation
Regression overview Interpreting regression coefficients Intercept – The predicted score on y when all predictors are 0 Slope – The predicted increase in y for a 1 unit increase in x With multiple predictors the slope is the predicted increase in y for a 1 unit increase in x holding all other predictors constant. Introduction and Basic Mediation
24
Introduction and Basic Mediation
Regression overview Standardized vs. unstandardized slopes The regression slopes we’ve discussed thus far are unstandardized slopes Based on the original metric of the variable SPSS call these “B” We could also estimate standardized regression slopes Convert y and all x’s to Z scores and fit the regression SPSS calls these “Beta” With one predictor the standardized slope = r Be careful with these! Introduction and Basic Mediation
25
Introduction and Basic Mediation
Regression overview Hypothesis tests for slopes Almost every regression program will provide you with a test statistic (and p-value) for each regression slope These are based on Wald statistics (either t or z) Wald statistics is the parameter estimate divided by its standard error Usually we test if the slope if different from zero Introduction and Basic Mediation
26
Introduction and Basic Mediation
Regression overview Comparing models For each model we get an estimate of R2 The proportion of variance in y explained by the x’s We can compare the change in R2 across models (when adding predictors) to see if adding predictors improves the fit of the model. When adding 1 predictor the test of the change in R2 is the same thing as testing for the significance of the slope. Introduction and Basic Mediation
27
Introduction and Basic Mediation
Regression overview Example from Jose (2013) File: Mediation_example.sav Data from the International Wellbeing Survey International sample of 364 adults between the ages of 17 and 79 Variables ple = positive life events grat = gratitude shs = subjective happiness scale Introduction and Basic Mediation
28
Introduction and Basic Mediation
Regression overview Thus far we have discussed predictors that are “continuous” variables What if a predictor is a categorical variable? The variable is coded into 1 or more “dummy” (or contrast) variables representing differences between groups We always need k-1 dummy variables to represent k categories Example: Sex would be coded into a dummy variable called Male with male = 1 and female = 0 Introduction and Basic Mediation
29
Introduction and Basic Mediation
Regression overview The slope of a dummy variable represents the mean difference on y between that group and all other groups. With simple linear regression this is equivlent to doing a t-test Example: experimental_mediation_example.sav Does gratitude differ between treatment and control groups? Treatment is a positive psychology based intervention for adolescents Introduction and Basic Mediation
30
Introduction and Basic Mediation
Regression overview OLS regression assumes that the outcome variable (y) is measured on a “continuous” scale. What if the outcome variable in regression is dichotomous? Example: Has a participant been arrested? Analyze with logistic regression! Categorical DVs can make mediation a bit complicated. We’ll talk about this tomorrow. Introduction and Basic Mediation
31
Introduction and Basic Mediation
Three variable system Predictor variable – X Outcome variable – Y Mediator variable – M M (partially) explains the relationship between X and Y Introduction and Basic Mediation
32
Pieces of the mediation puzzle
X Y c X Y M c' a b Introduction and Basic Mediation
33
How do we get estimates of a, b, and c?
We can gain estimates of a, b, c, and c’ through a series of separate regression models: Introduction and Basic Mediation
34
Introduction and Basic Mediation
Example: c path PLE Happiness .485 Introduction and Basic Mediation
35
Introduction and Basic Mediation
Example: a path PLE Happiness Gratitude c' 1.752 b Introduction and Basic Mediation
36
Introduction and Basic Mediation
Example: b and c’ paths PLE Happiness Gratitude .269 1.752 .123 Introduction and Basic Mediation
37
What do the paths tell us about mediation?
When investigating mediation we are interested in if strength of the relationship between X and Y is reduced when M is included in the regression equation Is the direct effect (c’) less than the total effect (c)? Does c – c’ = 0? Introduction and Basic Mediation
38
What do the paths tell us about mediation?
In our example c = .485 and c’ = .269 c – c’ = .485 – .269 = .216 c – c’ is also called the indirect effect The indirect effect can also be estimated by multiplying a*b a*b = 1.752*.123 = .216 a*b and c – c’ should provide the same value Introduction and Basic Mediation
39
Introduction and Basic Mediation
c – c’ = a*b Start with the three regression equations for mediation Plug in values for M and Y Use algebra! Introduction and Basic Mediation
40
Introduction and Basic Mediation
Testing for mediation When we test for mediation we test if the indirect effect is different from zero. If the indirect effect equals zero there is no evidence of mediation If the indirect effect does not equal zero there is evidence of mediation Introduction and Basic Mediation
41
Introduction and Basic Mediation
Testing for mediation There have been many methods developed to assess the indirect effect: Difference in coefficients (Baron & Kenny, 1984) Sobel test Distribution of the product method Bootstrap confidence intervals Monte Carlo confidence intervals Profile likelihood confidence intervals … Introduction and Basic Mediation
42
Difference in coefficients method
Fit regressions estimating a, b, c’, and c. Only continue if estimates of a, b, and c are significant. Mediation has occurred if c’ is not significant (but c is) THIS IS A SPECTACULARLY BAD IDEA! Introduction and Basic Mediation
43
Difference in coefficients method
Cons Not a test of the indirect effect “The Difference Between “Significant” and “Not Significant” is not Itself Statistically Significant” –Gelman &Stern (2006) Dependent on sample size With larger samples c’ will always be significant… c does not need to be significant to test for mediation We’ll discuss this in more detail in a bit The indirect effect may be significant even if a and/or b is not This is rare but it can happen Introduction and Basic Mediation
44
Introduction and Basic Mediation
Sobel test Compute a Wald statistic for the indirect effect Results in a z statistic We need estimates of the indirect effect (a*b) and its standard error These estimates are based on the unstandardized regression slopes and their standard errors Introduction and Basic Mediation
45
Introduction and Basic Mediation
Sobel test a and b are the unstandardized regression coefficients, sea and seb are the standard errors of a and b Introduction and Basic Mediation
46
Introduction and Basic Mediation
Sobel test Who wants to do this by hand? Built into the PROCESS macro Kris Preacher’s webpage: Other webpages: Introduction and Basic Mediation
47
Introduction and Basic Mediation
Preacher’s website Introduction and Basic Mediation
48
Introduction and Basic Mediation
Sobel test Pros: A test of the indirect effect Easy to specify We can use the standard error to compute a confidence interval for a*b (95% CI: ) Cons: Assumes the distribution of a*b is normal (and CI are symmetric. Even if a and b are normally distributed their product will not be normal! Not recommended! Introduction and Basic Mediation
49
Introduction and Basic Mediation
Testing for mediation There have been many methods developed to assess the indirect effect: Difference in coefficients (Baron & Kenny, 1984) Sobel test Distribution of the product method Bootstrap confidence intervals Monte Carlo confidence intervals Profile likelihood confidence intervals Introduction and Basic Mediation
50
Detour: Hypothesis testing with CIs
When testing the significance of a*b with the remaining methods. we use a CI to test our null hypothesis. H0: a*b = 0 If a*b is significant we say there is a less than 5% chance that a*b = 0 in the population A 95% CI provides the same information If 0 is not within the 95% CI: In 95% of samples of size n a*b ≠ 0. Significant mediation effect. If 0 is within the 95% CI: In less than 95% of samples of size n a*b ≠ 0. Non-significant mediation effect. Introduction and Basic Mediation
51
Distribution of the product method
If the distribution of a*b isn’t normal, can we use the (non-normal) distribution of a*b to generate a confidence interval? Usually involves computing asymmetrical confidence limits (adjusting the z value used to compute the CI) MacKinnon, Fritz, Williams, & Lockwood’s (2007) paper on PRODCLIN, a stand-alone program. Introduction and Basic Mediation
52
Distribution of the product method
Software implementations: PRODCLIN, a macro for SPSS or SAS (MacKinnon, Fritz, Williams, & Lockwood, 2007) RMediation package for R (Tofighi & MacKinnon, 2011) RMediation website: Introduction and Basic Mediation
53
Introduction and Basic Mediation
RMediation website Introduction and Basic Mediation
54
Distribution of the product method
Pros: A test of the indirect effect Does not assume the distribution of a*b is normal Cons: Assumes the distribution of a and b are normal (this isn’t a big deal) Requires specialized software Can be difficult to implement Introduction and Basic Mediation
55
Introduction and Basic Mediation
Bootstrapping Steps for bootstrapping Draw a sample from the data of size n with replacement Fit your model(s) to this data (e.g., estimate both a and b in two regressions) Save the parameter estimates from Step 2 Repeat Steps s of times The parameter estimates from Step 2 form a distribution for each parameter estimate The 2.5th and 97.5th percentiles of the distribution form the 95% CI Introduction and Basic Mediation
56
Introduction and Basic Mediation
Bootstrapping Orig Data Bootstrap 1 Bootstrap 2 Bootstrap 3 Stanley Andy Phyllis Jim Dwight Pam Introduction and Basic Mediation
57
Introduction and Basic Mediation
Bootstrapping Introduction and Basic Mediation
58
Introduction and Basic Mediation
Bootstrapping Introduction and Basic Mediation
59
Bootstrapping details
How to do it? Built into some SEM software (e.g., Mplus) PROCESS macro for SPSS and SAS (see afhayes.com) Other software (e.g., R, Stata) may require a bit of work Introduction and Basic Mediation
60
Introduction and Basic Mediation
Bootstrapping issues Multilevel data (we’ll talk about this later) Type of CI: percentile, Bias Corrected (BC), Bias Corrected, and Accelerated (BCa) Studies indicate that BCa CIs perform best (if available) Introduction and Basic Mediation
61
Introduction and Basic Mediation
PROCESS An SPSS/SAS macro that implements mediation and moderation (and all sorts of combinations of them) in a regression framework. Currently there are 76 different models PROCESS will fit A list of models can be found at: SPSS and SAS syntax are very similar. Introduction and Basic Mediation
62
Introduction and Basic Mediation
PROCESS To use a macro in SPSS or SAS we need to “install” it before use This needs to be done once per session Open the file processv211.sps or processv211.sas Highlight and run the entire contents of the file This creates a new command in SPSS or SAS syntax called “process” Introduction and Basic Mediation
63
Introduction and Basic Mediation
PROCESS The code for our example would be: SPSS process vars = ple grat shs/ y = shs/ x = ple/ m = grat/ total = 1/ model = 4/ boot = 5000/ effsize = 1. SAS %process (data = example_mediation, vars = ple grat shs, y = shs, x = ple, m = grat, total = 1, model = 4, boot = 5000, effsize = 1); Introduction and Basic Mediation
64
Introduction and Basic Mediation
PROCESS vars = ple grat shs The names of the variables used in the model. Any variables specified here but not in other parts of the syntax are control variables y = shs The outcome variable name x = ple The predictor variable name m = grat The mediating variable(s) name. Multiple variable names means multiple mediators total = 1 Print estimates of the total effect (1=yes, 0=no) model = 4 The model we wish to fit (based on the PROCESS templates) boot = 5000 Number of bootstrap resamples (larger is better…) effsize = 1 Print estimates of effect size for the indirect effect (1=yes, 0=no) Introduction and Basic Mediation
65
Introduction and Basic Mediation
Monte Carlo CI What if you don’t have the raw data? What if bootstrapping isn’t possible? Use a Monte Carlo CI! Available at quantpsy.org Or with the mc option in PROCESS Introduction and Basic Mediation
66
Introduction and Basic Mediation
Monte Carlo CI Steps for Monte Carlo CI Fit your models and save estimates of a, b, SEa and SEb Assume that a and b are normally distributed with mean a (or b) and standard deviation SEa (and SEb) Draw many (10000+) random values from the distribution of a and b. Compute a*b for each of these draws Use random draws to construct a distribution of a*b The 2.5th and 97.5th percentiles of the distribution form the 95% CI Introduction and Basic Mediation
67
Introduction and Basic Mediation
Monte Carlo CI Introduction and Basic Mediation
68
Introduction and Basic Mediation
Profile Likelihood CI Based on Maximum Likelihood (ML) estimation Finds values of a*b that increase the model log-likelihood by a set amount (e.g. 3.84) Limited software availability. OpenMX, others? Introduction and Basic Mediation
69
Sobel vs. Bootstrapping vs. Monte Carlo CI
When both a and b are large and n is large, all three techniques are similar When either a, b, or n is small, bootstrapping and Monte Carlo CIs are more accurate When either a or b is not normally distributed, bootstrapping is most accurate Take home message: When you can, bootstrap. When you can’t, use a Monte Carlo CI. Introduction and Basic Mediation
70
Introduction and Basic Mediation
Effect sizes Confidence intervals can tell us if an indirect effect is significant and a range of possible values for an indirect effect. They don’t tell us about the size of an indirect effect. Many effect sizes have been proposed for indirect effects but most tend to be problematic (see Preacher & Kelly, 2011). Introduction and Basic Mediation
71
Introduction and Basic Mediation
Effect sizes Effect sizes based on standardized coefficients Partially standardized indirect effect Standardize Y but not X Still depends on the scale of X Useful if X is dichotomous Completely standardized indirect effect Standardize X, M, and Y Scale independent SHOULD NOT BE USED WHEN X IS DICHOTOMOUS!!! Introduction and Basic Mediation
72
Introduction and Basic Mediation
Effect sizes Effect sizes based on ratios Ratio of the indirect effect to the total effect Problematic when c is very small Ratio of the indirect effect to the direct effect Problematic when c’ is very small Introduction and Basic Mediation
73
Introduction and Basic Mediation
Effect sizes Others… R2 due to the indirect effect Based on the assumption that X and Y are correlated Preacher & Kelly’s Kappa squared MAX(ab) is the largest possible value of the indirect effect given the data Ratio of the indirect effect to the largest possible indirect effect Introduction and Basic Mediation
74
Introduction and Basic Mediation
Effect sizes What to use? None of the effect sizes are perfect, think about the context of your study I would lean toward reporting a standardized estimate of the effect size and kappa squared The ratio and R2 estimates make me a bit nervous, but there are situations where they perform well. Introduction and Basic Mediation
75
Introduction and Basic Mediation
Interpretation When writing up the results from a mediation analyses it is easy to get stuck in the details of the analysis and miss the big picture If there is a significant indirect effect, describe each path in the model and how they lead to each other. To include a path diagram or not??? Introduction and Basic Mediation
76
Introduction and Basic Mediation
Interpretation PLE Happiness Gratitude .269 1.752 .123 Introduction and Basic Mediation
77
Introduction and Basic Mediation
Interpretation “The results show that if someone experiences a high level of positive life events, then he or she is likely to report greater happiness. This relationship can be partially explained by detailing the involvement of gratitude. In essence, higher levels of positive life events led to higher levels of gratefulness, and, in turn, gratefulness led to higher levels of happiness.” Introduction and Basic Mediation
78
Pitfalls (Alex’s soapbox time)
Does X have to predict Y to test for mediation? Holdover belief from the days of Baron & Kenny Your decision to test for an indirect effect should be based on theory, not on if a path is significant It is possible that X does not predict Y (the total effect = 0) but there is a significant indirect effect (the indirect effect ≠ 0) More on this when we talk about multiple mediators Introduction and Basic Mediation
79
Introduction and Basic Mediation
Pitfalls “Full” vs. “Partial” mediation Some people like the terms “full mediation” and “partial mediation” Full mediation occurs when the direct effect (c’) is not significant Partial mediation occurs when the direct effect (c’) is significant I HATE these terms Introduction and Basic Mediation
80
Introduction and Basic Mediation
Pitfalls “Full” vs. “Partial” mediation The biggest problem with these terms is that “full mediation” is seen as more desirable than “partial mediation” BUT full vs. partial mediation is a function of sample size! With a large enough sample you will almost never have full mediation. Introduction and Basic Mediation
81
Introduction and Basic Mediation
Pitfalls The issue of causation… Mediation is a causal process X causes changes in M and in turn M causes changes in Y Most mediation models are cross-sectional Like our example… With 3 measured, cross-sectional variables, determining causal ordering is difficult/impossible Is it X -> M -> Y or M -> Y -> X or… Introduction and Basic Mediation
82
Introduction and Basic Mediation
Pitfalls The issue of causation… How do we solve this issue? Experimentally manipulate X? Still a problem with M and Y Use longitudinal data? More on this later, but yes! Other methods of causal modeling See the field of causal mediation Beyond the scope of this workshop Introduction and Basic Mediation
83
That seems like enough for today…
To review: Simple and multiple regression Basic mediation involves 3 variables and 3 paths among them X, M, Y a, b, c’ When testing for mediation we test the indirect effect of a*b Test this with bootstrapping! Introduction and Basic Mediation
84
That seems like enough for today…
To review: PROCESS makes estimating and testing mediation models straightforward with SPSS and SAS Effect sizes for mediation can be tricky Watch out for other pitfalls! e.g. concurrent data Any last questions? Introduction and Basic Mediation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.