You are on page 1of 21

Moderator and Mediator

Analysis
Seminar General Statistics

Marijtje van Duijn


October 18, 2011

Overview
What is moderation and mediation?
What is their relation to statistical
concepts?
Example(s)

October 18, 2011

Moderator and mediator analysis

Mediation and Moderation

X1

X2
October 18, 2011

Moderator and mediator analysis

Examples
Y : test score
X1 : sex, SES, etc.
X2 : ability (IQ score)

Y : test score
X1 : brain volume, SES parents
X2 : ability
More?
October 18, 2011

Moderator and mediator analysis

Multiple regression

Yi = 0 + 1 X 1i + 2 X 2i + Ei
Goal: to explain variation in Y using Xs
Assumptions
Independent observations
Normality (of residuals) and constant
variance
Linearity (of relationship Y and Xs)
October 18, 2011

Moderator and mediator analysis

Regression Model

October 18, 2011

X1

X2

Moderator and mediator analysis

Explained variance in regression

X1

X2

Circles represent variances


X1 and X2 explain different parts of Y and are independent
October 18, 2011

Moderator and mediator analysis

Multicollinearity
competition between variables for explaining Y
Y

X1

X2

Degree depends on correlation between Xs


Variance inflation factor (VIF): worse (= less precise)
parameter estimation
October 18, 2011

Moderator and mediator analysis

Association between all (3) variables


Several correlations to describe association
Partial correlation: correlation between two variables with the
third variable fixed (i.e. corrected for the third variable)
(partial in SPSS) unique portion of variance
Semi-partial correlation: correlation between two variables
with one variables association corrected for the third
variable (part in SPSS output) extra variance explained
Important in regression when variables are entered in a certain
order

Usually the partial correlation is smaller than the


uncorrected (zero-order) correlation, and larger than
the semi-partial correlation
October 18, 2011

Moderator and mediator analysis

Multicollinearity/Mediation

X1

X2
October 18, 2011

Moderator and mediator analysis

10

Mediation as a special case of


multicollinearity and/or model selection
Causal model defines direction of arrows
X2 is the mediator (M)
Also: intervening or process variable
Or: indirect causal relationship

Relations between all variables are assumed


to be positive
Question is whether direct effect between X1
and Y disappears when M is added to the
regression equation
October 18, 2011

Moderator and mediator analysis

11

Mediation
(Baron & Kenny, 1986),
http://davidakenny.net/cm/mediate.htm)

c
c

X
a

M
October 18, 2011

Moderator and mediator analysis

12

Mediation as prescribed by
Baron and Kenny (1986)
Estimate regression of Y on only X1
Estimated parameter c

Estimate regression of M on X1
Estimated parameter a

Estimate effect of M on Y, together with X1


Estimated parameters b and c

Complete mediation: c=0


Partial mediation: c< c (can be tested)
October 18, 2011

Moderator and mediator analysis

13

Testing of change in c
Amount of mediation c-c
Theoretically equal to ab (indirect path)
Standard error of ab is approximately square
root of
b2sa2 + a2sb2 (Sobel test)
see (do) http://quantpsy.org/sobel/sobel.htm
Note: neither c nor c are needed!

Some eye-balling also possible


Or: nonparametric tests (based on bootstrapping)
October 18, 2011

Moderator and mediator analysis

14

Example (Miles and Shevlin)


Y: read, a measure of the number of books that
people have read.
X: enjoy, scale score to measure how much people
enjoy reading books
M: buy, a measure of how many books people have
bought in the previous 12 months
Idea: how much people enjoy reading books -> the
number of books bought -> the number of books read
But: is the number of books a complete mediator.?
(People could go to the library or borrow books from
friends.)
October 18, 2011

Moderator and mediator analysis

Descriptive Statistics

read
buy

Correlations

Mean
8,85

Std.
Deviation
3,563

15,73

8,165

40

9,28

5,354

40

enjoy

15

read
1,000

buy
,747

enjoy
,732

buy

,747

1,000

,644

enjoy

,732

,644

1,000

N
read

Pearson
Correlation

40

Step 1
Coefficientsa
Model
Unstandardized
Coefficients
1

(Constant)
enjoy

Standardized
Coefficients

B
4,331

Std. Error
,785

,487

,074

Beta
,732

t
5,517

Sig.
,000

6,625

,000

a. Dependent Variable: read

October 18, 2011

Moderator and mediator analysis

16

Step 2
Coefficientsa
Model
Standardiz
ed
Coefficients

Unstandardized
Coefficients
1

(Constant)
enjoy

B
Std. Error
6,616
2,020
,982

,189

Beta

,644

t
3,274

Sig.
,002

5,190

,000

a. Dependent Variable: buy

Step 3
Coefficientsa
Model
Unstandardized
Coefficients

Standardized
Coefficients

B
2,973

Std. Error
,765

buy

,205

,054

enjoy

,286

,083

(Constant)

Beta

Correlations
Zeroorder

t
3,887

Sig.
,000

Partial

Part

,471

3,786

,001

,747

,528

,360

,429

3,452

,001

,732

,494

,328

a. Dependent Variable: read

October 18, 2011

Moderator and mediator analysis

17

Examples
Baron/Kenny + Sobel

a=.982 sa =.189
b=.487 sb =.074
ab=.478, sab =(.4872*.1892+.9822*.0742)= .12
z-test 4.08; p<0.001

Eye-balling
c=.487 (.074), then roughly .34 < c < .64
c=.286 (.083): partial mediation (because .12 < c < .45)

October 18, 2011

Moderator and mediator analysis

18

Model choice is important


Many other patterns of association are
possible
Arrows between X1 and X2 may be
reversed not always clear which variable
mediates
No causal relation, just association

Explicit assumption of positive


associations and ordering of (semi-)
partial correlations. Not guaranteed
October 18, 2011

Moderator and mediator analysis

19

Moderation

X1

X2
October 18, 2011

Moderator and mediator analysis

20

10

Moderation is interaction
The effect of X2 depends on the value of X1
(or vice versa)
different slopes for different folks
can be a way to tackle non-linearity in regression

Interpretation depends on type of variable


Interaction usually (but not necessarily)
product of X1 and X2
X1 and X2 may be correlated
Importance of model formulation
October 18, 2011

Moderator and mediator analysis

21

Regression model
Yi = 0 + 1 X 1i + 2 X 2i + 3 X 1i X 2 i + Ei

Centering is (usually) advised


Facilitates interpretation
Reduces the inevitable multicollinearity
incurred with interaction terms
c

Yi = 0 + 1 X 1i + 2 X 2i + 3 X 1i X 2i + Ei
October 18, 2011

Moderator and mediator analysis

22

11

X1 dichotomous and X2 continuous


X1 = 0 or X1 = 1
(e.g. man/woman; control/experimental group)

Y = 0 + 1X1 + 2X2 + 3 X1X2


X1 = 0: Y = 0 + 2X2
X1 = 1: Y = (0 + 1) + (2 + 3)X2

so: intercept and regressioneffect of X2 change


interaction effect represents the change in effect of X2 or,
the difference in the effect of X2 between the two groups
interpretation of 1
General formula: Y = (0 + 1X1) + (2+ 3 X1)X2

October 18, 2011

Moderator and mediator analysis

23

X1 and X2 dichotomous
X1 = 0 or X1 = 1 (e.g. man/woman)
X2 = 0 or X2 = 1 (e.g. control/experimental grp)
Y = 0 + 1X1 + 2X2 + 3 X1X2
X1 = 0, X2 = 0 : Y = 0
X1 = 1, X2 = 0 : Y = 0 + 1
X1 = 0, X2 = 1 : Y = 0 + 2
X1 = 1, X2 = 1 : Y = 0 + 1+ 2+ 3
so: defines four groups with their own mean
Interaction defines extra effect of X1 =1 and X2 =1
October 18, 2011

Moderator and mediator analysis

24

12

X1 nominal and X2 continuous


X1 takes on more than 2 (c) values
(e.g. age groups, control/exp1/exp2)

Make dummies, for each contrast, wrt 1


reference group (e.g. controls)
Leads to c-1 dichotomous variables
And also c-1 interaction terms

Also possible: dummies (indicators) for


each group leaving out the intercept
October 18, 2011

Moderator and mediator analysis

25

c=3; group 1 reference group


group
D1
D2
1
0
0
2
1
0
3
0
1
Y = 0 + 1dD1 + 2dD2 + 2X2 +3 D1X2 +4 D2X2
group1: Y = 0 + 2X2
group2: Y = (0 + 1d) + (2 + 3)X2
group3: Y = (0 + 2d) + (2 + 4)X2
October 18, 2011

Moderator and mediator analysis

26

13

X1 and X2 continuous
Y = 0 + 1X1 +2X2 +3 X1X2
Y = (0 + 1X1) + (2+3 X1)X2
Y = (0 +2X 2) + (1+3 X2)X1
X1c = X1 X1
X 2c = X 2 X 2

X1 = X1 : Y = *0 + *2 X 2c

Y = *0 + *1 X1c + *2 X 2c + 3X1c X 2c

X 2 = X 2 : Y = *0 + *1 X1c

*
= 0 1X1 2 X 2 + 3X1X 2
0
*
1 = 1 3 X 2
*
2 = 2 3X1

October 18, 2011

Moderator and mediator analysis

27

Example (Miles and Shevlin)


Y: grade in statistics course
X1: number of books read (0-4)
X2: number of classes attended (0-20)
Descriptive Statistics

grade

October 18, 2011

Mean
Std. Deviation
63,5500
16,70552

N
40

books

2,00

1,432

40

attend

14,10

4,278

40

Moderator and mediator analysis

28

14

October 18, 2011

Moderator and mediator analysis

29

Coefficientsa
Model

Standardiz
ed
Coefficient
s

Unstandardized
Coefficients

(Constant)

B
Std. Error
63,422
2,223

booksc

4,037

attendc
2

1,753

,346
,329

1,283

,587

61,469

2,320

booksc

4,081

1,677

attendc

1,333
,735

(Constant)

bookscxatte
ndc
a. Dependent Variable: grade

October 18, 2011

Beta

Correlations
Zeroorder

Partial

Part

Collinearity
Statistics
Toleran
VIF
ce

t
28,534

Sig.
,000

2,303

,027

,492

,354

,310

,803

1,245

,482

,338

,295

,803

1,245

2,187

,035

26,494

,000

,350

2,433

,020

,492

,376

,314

,803

1,245

,562

,341

2,372

,023

,482

,368

,306

,802

1,247

,349

,271

2,104

,042

,241

,331

,271

,997

1,003

Moderator and mediator analysis

30

15

Other example
(missed) interaction:
non-linearity?

3 groups with
each a distinct
linear relation

October 18, 2011

Moderator and mediator analysis

31

October 18, 2011

Moderator and mediator analysis

32

16

October 18, 2011

Moderator and mediator analysis

33

Model Summaryb
Model
1

Adjusted
R Square
.134

R
R Square
.405a
.164

Residuals Statisticsa

Std. Error of
the Estimate
2.57780

Predicted Value
Residual
Std. Predicted Value
Std. Residual

a. Predictors: (Constant), x
b. Dependent Variable: y

Minimum
5.8864
-4.88636
-1.767
-1.896

Maximum
9.7927
3.16046
1.719
1.226

Mean
7.8667
.00000
.000
.000

Std. Deviation
1.12042
2.53297
1.000
.983

N
30
30
30
30

a. Dependent Variable: y

Coefficientsa

Model
1

(Constant)
x

Unstandardized
Coefficients
B
Std. Error
5.724
1.029
.163
.070

Standardized
Coefficients
Beta
.405

t
5.560
2.341

Sig.
.000
.027

Correlations
Partial

Zero-order
.405

Collinearity Statistics
Tolerance
VIF

Part

.405

.405

1.000

1.000

a. Dependent Variable: y

Normal P-P Plot of Regression Standardized Residual

Histogram

Dependent Variable: y

Dependent Variable: y
1,0

Expected Cum Prob

Frequency

0,8

0,6

0,4

2
0,2

Mean =-2,78E-17

Std. Dev. =0,983

N =30

0
-2

0,0
0,0

October 18, 2011

0,2

0,4

0,6

0,8

1,0

Observed Cum Prob

Regression Standardized Residual

Moderator and mediator analysis

34

17

Model Summaryb
Model
1

R
R Square
.980a
.960

Residuals Statisticsa

Adjusted
R Square
.957

Std. Error of
the Estimate
.57477

Predicted Value
Residual
Std. Predicted Value
Std. Residual

a. Predictors: (Constant), xkwadraat, x


b. Dependent Variable: y

Minimum
.5888
-.82773
-2.682
-1.440

Maximum
10.4412
1.16910
.949
2.034

Mean
7.8667
.00000
.000
.000

Std. Deviation
2.71361
.55460
1.000
.965

N
30
30
30
30

a. Dependent Variable: y

Coefficientsa

Model
1

Unstandardized
Coefficients
B
Std. Error
8.512
.259
.140
.016
-.054
.002

(Constant)
x
xkwadraat

Standardized
Coefficients
Beta
.349
-.894

t
32.839
9.042
-23.156

Sig.
.000
.000
.000

Zero-order

Correlations
Partial

.405
-.916

Part

.867
-.976

Collinearity Statistics
Tolerance
VIF

.348
-.892

.996
.996

1.004
1.004

a. Dependent Variable: y

Histogram

Partial Regression Plot

Dependent Variable: y

Dependent Variable: y

2,00

Frequency

0,00

Mean =-3,61E-16

Std. Dev. =0,965

N =30

0
-2

-2,00

-15,00

-10,00

-5,00

0,00

Regression Standardized Residual

October 18, 2011

R
R Square
.410a
.168

10,00

15,00

Moderator and mediator analysis

35

Model Summaryb
Model
1

5,00

Residuals Statisticsa

Adjusted
R Square
.107

Std. Error of
the Estimate
2.61796

Predicted Value
Residual
Std. Predicted Value
Std. Residual

a. Predictors: (Constant), groep, x


b. Dependent Variable: y

Minimum
5.7131
-4.71313
-1.896
-1.800

Maximum
9.9467
3.17007
1.831
1.211

Mean
7.8667
.00000
.000
.000

Std. Deviation
1.13588
2.52607
1.000
.965

N
30
30
30
30

a. Dependent Variable: y

Coefficientsa

Model
1

Unstandardized
Coefficients
B
Std. Error
6.021
1.301
.220
.166
-.528
1.375

(Constant)
x
groep

Standardized
Coefficients
Beta
.548
-.158

t
4.629
1.329
-.384

Sig.
.000
.195
.704

Zero-order

Correlations
Partial

.405
.337

Part

.248
-.074

Collinearity Statistics
Tolerance
VIF

.233
-.067

.181
.181

5.515
5.515

a. Dependent Variable: y
Partial Regression Plot
Histogram

Dependent Variable: y
Dependent Variable: y

2,50

0,00
4

Frequency

-2,50
2

Mean =5,69E-16

Std. Dev. =0,965

N =30

0
-2

Regression Standardized Residual

-5,00

-4,00

-2,00

0,00

2,00

4,00

October 18, 2011

Moderator and mediator analysis

36

18

Model Summaryb
Model
1

R
R Square
.750a
.562

Residuals Statisticsa

Adjusted
R Square
.512

Std. Error of
the Estimate
1.93502

Predicted Value
Residual
Std. Predicted Value
Std. Residual

a. Predictors: (Constant), groep3, groep2, x


b. Dependent Variable: y

Minimum
4.7273
-3.72727
-1.511
-1.926

Maximum
11.1227
3.72727
1.568
1.926

Mean
7.8667
.00000
.000
.000

Std. Deviation
2.07709
1.83220
1.000
.947

N
30
30
30
30

a. Dependent Variable: y
Coefficientsa

Model
1

(Constant)
x
groep2
groep3

Unstandardized
Coefficients
B
Std. Error
4.556
.912
.172
.123
3.476
1.310
-.326
2.038

Standardized
Coefficients
Beta
.427
.602
-.056

t
4.994
1.396
2.653
-.160

Sig.
.000
.174
.013
.874

Zero-order

Correlations
Partial

.405
.645
-.030

Collinearity Statistics
Tolerance
VIF

Part

.264
.462
-.031

.181
.344
-.021

.180
.327
.135

5.552
3.057
7.394

a. Dependent Variable: y
Partial Regression Plot

Histogram

Dependent Variable: y

Dependent Variable: y

4,00

2,00

Frequency

0,00

-2,00

-4,00

Mean =3,47E-16

Std. Dev. =0,947

N =30

0
-2

-4,00

-2,00

0,00

October 18, 2011

R
R Square
.997a
.993

4,00

Moderator and mediator analysis

37

Model Summaryb
Model
1

2,00

Regression Standardized Residual

Adjusted
R Square
.992

Residuals Statisticsa

Std. Error of
the Estimate
.25050

Predicted Value
Residual
Std. Predicted Value
Std. Residual

a. Predictors: (Constant), intxgr3, intxgr2, x, groep2,


groep3
b. Dependent Variable: y

Minimum
1.0000
-.41818
-2.488
-1.669

Maximum
10.4182
.65758
.924
2.625

Mean
7.8667
.00000
.000
.000

Std. Deviation
2.76031
.22789
1.000
.910

N
30
30
30
30

a. Dependent Variable: y

Coefficientsa

Model
1

(Constant)
x
groep2
groep3
intxgr2
intxgr3

Unstandardized
Coefficients
B
Std. Error
4.97E-014
.171
1.000
.028
10.145
.417
18.000
.596
-.985
.039
-1.500
.039

Standardized
Coefficients
Beta
2.485
1.756
3.116
-2.378
-5.401

t
.000
36.259
24.309
30.201
-25.250
-38.458

Sig.
1.000
.000
.000
.000
.000
.000

Zero-order

Correlations
Partial

.405
.645
-.030
.626
-.081

Collinearity Statistics
Tolerance
VIF

Part

.991
.980
.987
-.982
-.992

.609
.408
.507
-.424
-.646

.060
.054
.026
.032
.014

16.657
18.505
37.737
31.455
69.919

a. Dependent Variable: y
Partial Regression Plot
Histogram

Dependent Variable: y
Dependent Variable: y
12

4,00

10

Frequency

2,00
8

0,00

-2,00

Mean =2,81E-15

Std. Dev. =0,91

N =30

0
-2

-4,00

Regression Standardized Residual

-4,00

-2,00

0,00

2,00

4,00

October 18, 2011

Moderator and mediator analysis

38

19

Model choice important


Missing interaction may result in
Violations of linearity assumption
non-constant variance (heterogeneity)
Incorrect model choice and interpretation

October 18, 2011

Moderator and mediator analysis

39

Conclusion
Model choice and selection crucial in
detecting mediation and moderation
Substantive / theoretical considerations
should guide the model selection
process!

October 18, 2011

Moderator and mediator analysis

40

20

Other methods/models
Mediation sometimes too simple
More refined path analysis

Regression analysis sometimes too


simple
More elaborate models for causal
modeling
Structural Equation Models
October 18, 2011

Moderator and mediator analysis

41

21

You might also like