You are on page 1of 77

Estimating and Testing Mediation

David A. Kenny

University of Connecticut
1

Overview
Introduction (click to go there) Baron & Kenny Steps (click) Power (click) Test of the Indirect Effect (click) Assumptions (click) Additional Variables (click)
2

Introduction
3

Interest in Mediation
Mentions of mediation or mediator in psychology abstracts: 1980: 36 1990: 122 2000: 339 2010: 1,198
4

Why the Interest in Mediation?


Understand the mechanism theoretical concerns cost and efficiency concerns Find more proximal endpoints Understand why the intervention did not work finding the missing link compensatory processes
5

The Beginning Model

The Mediational Model

The Four Paths


X Y: path c X M: path a M Y (controlling for X): path b X Y (controlling for M): path c (standardized or unstandardized)

Baron & Kenny Steps


9

10

Baron and Kenny Steps


Step 1: X Y (test path c)

Step 2: X M (test path a)


Step 3: M (and X) Y (test path b) Step 4: X (and M) Y (test path c)

Note that Steps 3 and 4 use the same regression equation.

11

Total and Partial Mediation


Total Mediation
Meet steps 1, 2, and 3 and find that c equal zero.

Partial Mediation
Meet steps 1, 2, and 3 and find that c is smaller in absolute value than c.

12

Example Dataset
Morse et al. J. of Community Psychology, 1994 treatment housing contacts days of stable housing persons randomly assigned to treatment groups. 109 people

13

Variables in the Example


Treatment 1 = treated (intensive case management) 0 = treatment as usual Housing Contacts: number of contacts for the year after the intervention began Stable Housing days per month with adequate housing (0 to 30) measured for 9 months, one year after the intervention began
14

Morse et al. Example


Step 1: X Y c = 6.558, p = .009 Step 2: X M a = 1.831, p = .013 Step 3: M (and X) Y b = 1.398, p < .001 Step 4: X (and M) Y c = 3.998, p = .089

15

Decomposition of Effects
Total Effect = Direct Effect + Indirect Effect c = c + ab Note that ab = c - c This equality exactly holds for multiple regression, but not necessarily for other estimation methods. Example:
6.558 = 3.998 + 2.560 (1.831x 1.398) And 100(2.56/6.56) = 39% of the total effect is explained (ab/c or equivalently 1 - c/c).

16

When Can We Conclude Complete Mediation?


When c is not statistically different from zero, but c is? NOT REALLY Ideally when ab is substantial and c is small, not just statistically non-significant.

17

Estimating the Total Effect (c)


The total effect or c can be inferred from direct and indirect effect as c + ab. We need not perform Step 1 to estimate c. This can be useful in situations when c does not exactly equally c + ab.

18

All Four Steps Essential?


Steps 1 and 4 are not so key. Steps 2 and 3 are essential. Note that ab measures the indirect or the amount of the total effect that is mediated. Need a way of testing the null hypothesis that the indirect effect of ab is zero (discussed later).

19

Inconsistent Mediation
ab and c have a different sign X as a suppressor variable Example: Stress and Mood with Coping as a Mediator Consequences
Step 1 may fail Percent mediated greater than 100%

Do we have mediation?
Yes. There is an indirect effect (ab > 0). No. There is no effect that is mediated.
20

Presenting Mediation

21

Power
22

Power and the Test of c


If c is zero, then c equals ab. If both a and b have a moderate effect size, then c has a smaller than small effect size (assuming c is zero). Thus, it is very possible to have tests of significance for a and b be statistically significant, but c is not. Note that for the example if a and b have moderate effect sizes (r = .3) and c = 0, the power of the test of c is only .15. 23

Power and the Test of c


When b = 0, c = c and in this case c might be statistically significant, yet c might not be significant even though. Why? There is multicollinearity between X and M due to path a. Note that as M becomes a more successful mediator and path a gets larger, multicollinearity becomes more of a issue in the testing of c (and b).
24

Power and the Test of b


Test of path a has more power than the test of path b (b = .3, standardized): a N .1 86 .3 93 .5 112 (a is standardized; sample size needed for 80% power to reject the null hypothesis that b = 0) Conclusion: Power of the test of b declines as a increases.
25

Test of the Indirect Effect


26

Strategies to Test ab = 0
Test a and b separately Sobel test Bootstrapping

27

Test a and b Separately


Easy to do Works fairly well

28

Sobel Test of Mediation


Compute the square root of a2sb2 + b2sa2 which is denoted as sab Note that sa and sb are the standard errors of a and b, respectively; ta = a/sa and tb = b/sb. Divide ab by sab and treat that value as a Z. So if ab/sab greater than 1.96 in absolute value, reject the null hypothesis that the indirect effect is zero.
29

Example
a = 1.831 and b = 1.398 sa = 0.728 and sb = 0.301 ab = 2.56; sab = 1.157 Sobel test Z is 2.213, p = .027 We conclude that the indirect effect is statistically different from zero.
Website: http://www.people.ku.edu/~preacher/sobel/sobel.htm
30

Large values of ab are more variable than small values (i.e., 0).

The distribution of ab is highly skewed which lowers the power of the test.
31

Bootstrapping
Nonparametric way of computing a sampling distribution. Re-sampling (with replacement) Many trials (computationally intensive) Correct for bias
Mean of the bootstrap estimate differs slightly from the estimate.

Compute a confidence interval which is asymmetric. Slight changes because empirically derived.

32

Results of Bootstrapping
95% Bias Corrected Confidence Interval: Lower Upper .4322 5.0326 Note that the CI is asymmetric for an estimate of 2.598. Also values differ to sampling error. (Done using the Hayes & Preacher macro from http://www.afhayes.com/spss-sas-and-mplus-macros-and-code.html.)
33

Assumptions
34

Assumptions: Multiple Regression


Linearity
Is a problem in the example; housing contacts has a quadratic effect on stable housing (p = .034).

Normal Distribution of Errors


Interval level of measurement of M and Y

Equal Error Variance Independence


No clustering

X and M Do Not Interact to Cause Y

35

No XM Interaction: Linear Mediation


Called Moderation in Baron & Kenny Add XM (and possibly other interaction terms, e.g., X2M) when explaining Y. Not significant for the example (p = .476)

36

Causal Assumptions
Perfect Reliability for M and X No Reverse Causal Effects Y may not cause M M and Y not cause X No Omitted Variables all common causes of M and Y, X and M, and X and Y measured and controlled (Guaranteed if X is manipulated.)
37

Basic Mediational Causal Model


U1
1

Note that U1 and U2 are theoretical variables and not errors from a regression equation.

U2
1 c'

38

Unreliability
Usually safe to assume that X is perfectly reliable. Measurement error in Y does not bias unstandardized regression coefficients. Measurement error in M is problematic.
39

Unreliability in M
Error
1

M
1 1

U1

M Latent

U2
1 c'

40

Effect of Unreliability in M
b is attenuated (closer to zero) c is inflated (given consistent mediation) more as a increases more as b increases Note that the bigger the indirect, the greater the bias in c.
41

What to Do about Unreliability in M?


Improve the reliability Adjust estimates using Structural Equation Modeling

42

Omitted Variables
U1
1 e

Omitted Variable

f a b

U2
1 c'

Y
43

What is the Effect of Omitted Variables?


Usually, but not always, the sign of ef is the same as b.
Inflating the estimate of b Deflates the estimate of c (could produce inconsistent mediation).

44

Effect of Vitamin A Supplements in Northern Sumatra

45

Standard Results

46

Results with an Omitted Variable

47

What to Do about Omitted Variables?


Do not omit them: Include them in the analysis as covariates. If there is good reason to believe that c = 0, they can be allowed for. Sometimes the omitted variable is shared method effects. If an issue, measure M and Y by different methods.
48

Reverse Causation
U1
1

a g

U2
1 c'

49

Effect of Reverse Causation


Typically, b and g have the same sign, which likely makes the value of b inflated and the value of c deflated.

50

What to Do about Reverse Causation?


Longitudinal designs If c = 0, then the model can be estimated. Instrumental variable method.

51

Timing of the Measurement of the Mediator


Mediator should be measured after X but before Y. X might be measured at the same time as Y (e.g., number of treatment sessions), but it must be assumed that X has not changed since when it affected Y.

52

Controlling for Prior Values


Obtain baseline measures of M and Y. Control for baseline M and Y in the analysis.

53

Mediation: The Full Model


M True
1

M
1

EX
1 a

EM U

X
1 1

V
1

X True

c'

Y
54

Mediation: The Full Model X Manipulated


U EM
1

1 1

M True

V
1

c'

Y
55

Additional Variables
56

Additional Variables
Multiple Xs Multiple Ms Multiple Ys Covariates

57

Multiple Xs
Consider two Xs.
happens when X is categorical and there are more than two treatment groups

Now two indirect effects a1b and a2b. Can combine the Xs using a formative variable.
58

Multiple Mediators
Consider two mediators, 1 and 2, and two indirect effects a1b1 and a2b2. Can test:
Are both different from zero? Is each different from zero? Is one larger than the other?
59

Example
Two mediators: housing contacts and entitlement contacts. Tests:
Is the sum different from zero?
c c CI: (1.2383 to 6.6453) Yes

Is each different from zero?


Housing Contacts CI: (0.4291 to 4.5582) Yes Entitlement Contacts CI: (0.0162 to 3.6826) Yes

Is one larger than the other?


H Contacts E contacts CI: (-1.6469 to 3.7828) No
60

Dual Mediation: Special Example of Two Mediators


X has two levels Each level is intervention Both equally effective Each works through a different mechanism (i.e., mediator).

61

Dual Mediation with No Intervention Effect

62

Mediation with No Intervention Effect

Note that total effect of X on Y is .25 + (-.25) = 0!

63

Causal Chains
One mediator causes another X M1 M2 Y Indirect effect the product of three terms: ab1b2

64

Multiple Outcomes
Consider two outcomes. Now two indirect effects ab1 and ab2. Consider combining outcome variables into a single variable, e.g., as a latent variables.
65

Covariates
Often there are variables in the analysis that need to be controlled:
Demographics Baseline measures

If a covariate interacts with X, it becomes a moderator.


66

Topics Not Discussed


Use of SEM simultaneous estimation latent variables (reflective and formative) instrumental variable estimation Mediators or outcomes that are categorical or counted Clustering and multilevel mediation Mediated moderation and moderated 67 mediation

Conclusion
Mediational Analyses Are Very Simple Mediational Analyses Are Very Difficult
Difficulties are more in the conceptualization and measurement than in the statistical analysis.
68

Additional Slides
69

Mediation with Moderation


Moderation A causal effect varies as a function of some variable. Housing intervention program is stronger from men than women. Tested by an intervention X gender interaction. Combining the two Moderated Mediation Mediated Moderation

70

Moderated Mediation
Begin with a mediation analysis and estimate a, b, and c. Two paths that can be moderated a path might vary due to moderator b path might vary due to moderator If one or both is moderated, the indirect effect or ab is moderated. Strategy Conduct two moderator analyses: one on M and one on Y. Measure how the indirect effect changes as a function of the moderator. That change need not be linear.
71

Example: Moderated Mediation


We find that use of services mediates the effect of the intervention. Two paths that can be moderated The effect of the intervention on services is stronger for men than women. The effect of services on the days housed is stronger for men who receive the intervention. Note that moderated mediation can be reexpressed as moderated mediation.
72

Mediated Moderation
Begin with moderation.
Show that the moderator affects the X Y

Introduce a mediator and replace X with the interaction of X with Moderator


repeat Baron and Kenny steps but X is replaced by an X by moderator interaction

73

Example: Mediated Moderation


Step 1: Intervention effects stronger for men than women. Step 2: Men who receive the intervention receive more services than do women. Step 3: Services increase the number of days housed. Step 4: The gender difference in intervention effect disappears when services is controlled.
74

Graph of Mediation
Copied from MacKinnon et al. (2007)

75

DataToText Project
Have the researcher tell DataToText what is the research question. DataToText performs the requisite analyses. DataToText gives the results from those analyses: computer output a written description
76

http://davidakenny.net/dtt/datatotext.htm http://davidakenny.net/dtt/mediate.htm

Morse et al.: The effect of Treatment on Stable Housing is mediated by Housing Contacts.
77

You might also like