Workshop Moderated Regression Analysis

94
Workshop Moderated Regression Analysis EASP summer school 2008, Cardif Wilhelm Hofmann

description

Workshop Moderated Regression Analysis. EASP summer school 2008, Cardiff Wilhelm Hofmann. Overview of the workshop. Introduction to moderator effects Case 1: continuous  continuous variable Case 2: continuous  categorical variable Higher-order interactions Statistical Power - PowerPoint PPT Presentation

Transcript of Workshop Moderated Regression Analysis

Page 1: Workshop  Moderated Regression Analysis

Workshop Moderated Regression Analysis

EASP summer school 2008, Cardiff

Wilhelm Hofmann

Page 2: Workshop  Moderated Regression Analysis

2

Overview of the workshop

Introduction to moderator effects Case 1: continuous continuous variable Case 2: continuous categorical variable Higher-order interactions Statistical Power Outlook 1: dichotomous DVs Outlook 2: moderated mediation analysis

Page 3: Workshop  Moderated Regression Analysis

3

Main resources

The Primer: Aiken & West (1991). Multiple regression: Testing and interpreting interactions. Newbury Park, CA: Sage.

Cohen, Aiken, & West (2004). Regression analysis for the behavioral sciences, [Chapters 7 and 9]

West, Aiken, & Krull (1996). Experimental personality designs: Analyzing categorical by continuous variable interactions. Journal of Personality, 64, 1-48.

Whisman & McClelland (2005). Designing, testing, and interpreting interactions and moderator effects in family research. Journal of Family Psychology, 19, 111-120.

This presentation, dataset, syntaxes, and excel sheets available at Summer School webpage!

Page 4: Workshop  Moderated Regression Analysis

4

What is a moderator effect?

Effect of a predictor variable (X) on a criterion (Z) depends on a third variable (M), the moderator

Synonymous term: interaction effect

X

M

Y

Page 5: Workshop  Moderated Regression Analysis

5

Examples from social psychology

Social facilitation: Effect of presence of others on performance depends on the dominance of responses (Zajonc, 1965)

Effects of stress on health dependent on social support (Cohen & Wills, 1985)

Effect of provocation on aggression depends on trait aggressiveness (Marshall & Brown, 2006)

Page 6: Workshop  Moderated Regression Analysis

6

Simple regression analysis

X Y

XbbY 10ˆ

Page 7: Workshop  Moderated Regression Analysis

7

Simple regression analysis

XbbY 10ˆ

X

Yb1

b0

Page 8: Workshop  Moderated Regression Analysis

8

Multiple regression with additive predictor effects

X

M Y

MbXbbY 210ˆ

Page 9: Workshop  Moderated Regression Analysis

9

Y

XbMbbY

MbXbbY

120

210

)(ˆ

ˆ

Multiple regression with additive predictor effects

X

b1

b0

Low M

Medium M

High M

b2

intercept

The intercept of regression of Y on X depends upon the specific value of M

Slope of regression of Y on X (b1) stays constant

Page 10: Workshop  Moderated Regression Analysis

10

Multiple regression including interaction among predictors

X

M Y

XM

MXbMbXbbY 3210ˆ

Page 11: Workshop  Moderated Regression Analysis

11

X

Y

Multiple regression including interaction among predictors

Low M

Medium M

High M

XMbbMbbY

MXbMbXbbY

)()(ˆ

ˆ

3120

3210

intercept slope

The slope and intercept of regression of Y on X depends upon the specific value of M

Hence, there is a different line for every individual value of M (simple regression line)

Page 12: Workshop  Moderated Regression Analysis

12

Regression model with interaction: quick facts

MXbMbXbbY 3210ˆ

The interaction is carried by the XM term, the product of X and M

The b3 coefficient reflects the interaction between X and M only if the lower order terms b1X and b2M are included in the equation! Leaving out these terms confounds the additive and

multiplicative effects, producing misleading results

Each individual has a score on X and M. To form the XM term, multiply together the individual‘s scores on X and M.

Page 13: Workshop  Moderated Regression Analysis

13

Regression model with interaction

MXbMbXbbY 3210ˆ

There are two equivalent ways to evaluate whether an interaction is present: Test whether the increment in the squared multiple correlation

(R2) given by the interaction is significantly greater than zero Test whether the coefficient b3 differs significantly from zero

Interactions work both with continuous and categorical predictor variables. In the latter case, we have to agree on a coding scheme (dummy vs. effects coding)

Workshop Case I: continous continuous var interaction Workshop Case II: continuous categorical var interaction

Page 14: Workshop  Moderated Regression Analysis

14

Case 1: both predictors (and the criterion) are continuous

X: height

M: age

Y: life satisfaction

Does the effect of height on life satisfaction depend on age?

height

age Life Sat

heightage

Page 15: Workshop  Moderated Regression Analysis

15

The Data (available at the summer school homepage)

Page 16: Workshop  Moderated Regression Analysis

16

Descriptives

Page 17: Workshop  Moderated Regression Analysis

17

Advanced organizer for Case 1

I) Why median splits are not an option II) Estimating, plotting, and interpreting the

interaction Unstandardized solution Standardized solution

III) Inclusion of control variables IV) Computation of effect size for interaction

term

Page 18: Workshop  Moderated Regression Analysis

18

I) Why we all despise median splits: The costs of dichotomization

So why not simply split both X and M into two groups each and conduct ordinary ANOVA to test for interaction? Disadvantage #1: Median splits are highly sample

dependent Disadvantage #2: drastically reduced power to detect

(interaction) effects by willfully throwing away useful information

Disadvantage #3: in moderated regression, median splits can strongly bias results

For more details, see Cohen, 1983; Maxwell & Delaney, 1993; West, Aiken, & Krull, 1996)

Page 19: Workshop  Moderated Regression Analysis

19

II) Estimating the unstandardized solution Unstandardized = original metrics of

variables are preserved Recipe

Center both X and M around the respective sample means

Compute crossproduct of cX and cMRegress Y on cX, cM, and cX*cM

Page 20: Workshop  Moderated Regression Analysis

20

Why centering the continuous predictors is important Centering provides a meaningful zero-point for X and M (gives

you effects at the mean of X and M, respectively) Having clearly interpretable zero-points is important because, in

moderated regression, we estimate conditional effects of one variable when the other variable is fixed at 0, e.g.:

Thus, b1 is not a main effect, it is a conditional effect at M=0! Same applies when viewing effect of M on Y as a function of X. Centering predictors does not affect the interaction term, but all

of the other coefficients (b0, b1, b2) in the model Other transformations may be useful in certain cases, but mean

centering is usually the best choice

)()(ˆ

10

3120

MwhenXbbY

XMbbMbbY

Page 21: Workshop  Moderated Regression Analysis

21

SPSS Syntax

*unstandardized.*center height and age (on grand mean) and compute interaction term.DESC var=height age.COMPUTE heightc = height - 173 .COMPUTE agec = age - 29.8625.

COMPUTE heightc.agec = heightc*agec.

REGRESSION /STATISTICS = R CHA COEFF /DEPENDENT lifesat /METHOD=ENTER heightc agec /METHOD=ENTER heightc.agec.

Page 22: Workshop  Moderated Regression Analysis

22

SPSS output

MX008.M017.X034.016.5Y

Do not interpret betas as given by SPSS, they are wrong!

Test of significance of interaction

b0

b1

b2

b3

Page 23: Workshop  Moderated Regression Analysis

23

Plotting the interaction

SPSS does not provide a straightforward module for plotting interactions…

There is an infinite number of slopes we could compute for different combinations of X and M

Minimum: We need to calculate values for high (+1 SD) and low (-1 SD) X as a function of high (+1 SD) and low (-1 SD) values on the moderator M

Page 24: Workshop  Moderated Regression Analysis

24

Effect of height on life satisfaction 1 SD below the mean of age (M)-1 SD of height:

+1 SD of height:

1 SD above the mean of age (M) -1 SD of height:

+1 SD of height:

Unstandardized Plot

Compute values for the plot either by hand…

2280.4))963.4()547.9(008.())963.4(017(.))547.9(034(.016.5Y

6352.5))963.4()547.9(008.())963.4(017(.))547.9(034(.016.5Y

1548.5))963.4()547.9(008.())963.4(017(.))547.9(034(.016.5Y

963.4)age(SD

547.9)height(SD

)MX008.()M017(.)X034(.016.5Y

0459.5))963.4()547.9(008.())963.4(017(.))547.9(034(.016.5Y

3.5

4

4.5

5

5.5

6

Low Height High Height

Lif

e S

atis

fact

ion

Page 25: Workshop  Moderated Regression Analysis

25

… or let Excel do the job!

Adapted from Dawson, 2006

Page 26: Workshop  Moderated Regression Analysis

26

3,5

4

4,5

5

5,5

6

Low Height High Height

Lif

e S

atis

fact

ion

Low Age

Mean Age

High Age

Interpreting the unstandardized plot: Effect of height moderated by age

Mean Height

Intercept; LS at mean of height and age (when both are centered)

Simple slope of height at mean age

163 173 183

Simple slope of age at mean height (difficult to illustrate)

Change in the slope of height for eachone-unit increase in age

b = .034

b = .034+(-.008*4.9625) = -.0057

Change in the slope of height for a 1 SDincrease in age

Page 27: Workshop  Moderated Regression Analysis

27

3,5

4

4,5

5

5,5

6

Low Age Mean Age High Age

Lif

e S

atis

fact

ion

Low Height

Mean Height

High Height

Interpreting the unstandardized plot: Effect of age moderated by height

Intercept; LS at mean of age and height (when centered)Simple slope of

age at mean height

Simple slope of height at mean age (difficult to illustrate)

Change in the slope of age for each one-unit increase in height

Change in the slope of age for a 1 SD increase in height

b = .017+(-.008*9.547) = -.059

b = .017

Page 28: Workshop  Moderated Regression Analysis

28

Estimating the proper standardized solution Standardized solution (to get the beta-

weights)Z-standardize X, M, and YCompute product of z-standardized scores for

X and MRegress zY on zX, zM, and zX*zMThe unstandardized solution from the output

is the correct solution (Friedrich, 1982)!

Page 29: Workshop  Moderated Regression Analysis

29

Why the standardized betas given by SPSS are false SPSS takes the z-score of the product (zXM)

when calculating the standardized scores. Except in unusual circumstances, zXM is

different from zxzm, the product of the two z-scores we are interested in.

Solution (Friedrich, 1982): feed the predictors on the right into an ordinary regression. The Bs from the output will correspond to the correct standardized coefficients.

XMMXY zzzz 321 MXMXY zzzzz 321

Page 30: Workshop  Moderated Regression Analysis

30

SPSS Syntax

*standardized.*let spss z-standardize height, age, and lifesat.DESC var=height age lifesat/save.

*compute interaction term from z-standardized scores.COMPUTE zheight.zage = zheight*zage.

REGRESSION /DEPENDENT zlifesat /METHOD=ENTER zheight zage /METHOD=ENTER zheight.zage.

Page 31: Workshop  Moderated Regression Analysis

31

SPSS output

Side note: What happens if we do not standardize Y?

→Then we get so-called half-standardized regression coefficients (i.e., How does one SD on X/M affect Y in terms of original units?)

Page 32: Workshop  Moderated Regression Analysis

32

Standardized plot

-1

-0,5

0

0,5

1

Low Height Mean Height High Height

Lif

e S

atis

fact

ion

Low Age

Mean Age

High Age

Change in the beta of height for a 1 SDincrease in age

= .240

= .240+(-.270*1) = -.030

Page 33: Workshop  Moderated Regression Analysis

33

Simple slope testing

Test of interaction term: Does the relationship between X and Y reliably depend upon M?

Simple slope testing: Is the regression weight for high (+1 SD) or low (-1 SD) values on M significantly different from zero?

Page 34: Workshop  Moderated Regression Analysis

34

Simple slope testing

Best done for the standardized solution Simple slope testing for low (-1 SD) values of M

Add +1 (sic!) to M

Simple slope test for high (+1 SD) values of M Subtract -1 (sic!) from M

Now run separate regression analysis with each transformed score

0-1 SD +1 SD

0-1 SD +1 SD

0-1 SD +1 SD

original scale(centered)

Add 1 SD

Subtract 1 SD

Page 35: Workshop  Moderated Regression Analysis

35

SPSS Syntax***simple slope testing in standardized solution.*regression at -1 SD of M: add 1 to zage in order to shift new zero point one sd below the mean.compute zagebelow=zage+1.compute zheight.zagebelow=zheight*zagebelow.

REGRESSION /DEPENDENT zlifesat /METHOD=ENTER zheight zagebelow /METHOD=ENTER zheight.zagebelow.

*regression at +1 SD of M: subtract 1 to zage in order to shift new zero point one sd above the mean.compute zageabove=zage-1.compute zheight.zageabove=zheight*zageabove.

REGRESSION /DEPENDENT zlifesat /METHOD=ENTER zheight zageabove /METHOD=ENTER zheight.zageabove.

Page 36: Workshop  Moderated Regression Analysis

36

Simple slope testing: Results

Page 37: Workshop  Moderated Regression Analysis

37

Illustration

-1

-0,5

0

0,5

1

Low Height Mean Height High Height

Lif

e S

atis

fact

ion

Low Age

Mean Age

High Age

= .509, p = .003

= -.030, p = .844

Page 38: Workshop  Moderated Regression Analysis

38

III) Inclusion of control variables

Often, you want to control for other variables (covariates)

Simply add centered/z-standardized continuous covariates as predictors to the regression equation

In case of categorical control variables, effects coding is recommended

Example: Depression, measured on 5-point scale (1-5) with Beck Depression Inventory (continuous)

Page 39: Workshop  Moderated Regression Analysis

39

SPSSCOMPUTE deprc =depr – 3.02.

REGRESSION

/DEPENDENT lifesat

/METHOD=ENTER heightc agec deprc

/METHOD=ENTER agec.heightc.

Page 40: Workshop  Moderated Regression Analysis

40

A note on centering the control variable(s) If you do not center the control variable, the intercept will be affected

since you will be estimating the regression at the true zero-point (instead of the mean) of the control variable.

Depression centered

Depression uncentered (intercept estimated at meaningless value of 0 on the depr. scale)

Page 41: Workshop  Moderated Regression Analysis

41

IV) Effect size calculation

Beta-weight () is already an effect size statistic, though not perfect

f2 (see Aiken & West, 1991, p. 157)

Page 42: Workshop  Moderated Regression Analysis

42

Calculating f2

In words: f2 gives you the proportion of systematic variance accounted for by the interaction relative to the unexplained variance in the criterion

Conventions by Cohen (1988) f2

= .02: small effect

f2 = .15: medium effect

f2 = .26: large effect

2.

2.

2.2

1 AIY

AYAIY

r

rrf

:

:

2.

2.

AY

AIY

r

r Squared multiple correlation resulting from combined prediction of Y by the additive set of predictors (A) and their interaction (I) (= full model)

Squared multiple correlation resulting from prediction by set A only (= model without interaction term)

Page 43: Workshop  Moderated Regression Analysis

43

Example

063.110.1

054.110.

1 2.

2.

2.2

AIY

AYAIY

r

rrf

small to medium effect

Page 44: Workshop  Moderated Regression Analysis

44

Case 2: continuous categorical variable interaction (on continous DV) Ficticious example

X: Body height (continuous) Y: Life satisfaction (continuous) M: Gender (categorical: male vs. female)

Does effect of body height on life satisfaction depend on gender? Our hypothesis: body height is more important for life satisfaction in males

Page 45: Workshop  Moderated Regression Analysis

45

Advanced organizer for Case 2 I) Coding issues II) Estimating the solution using dummy coding

Unstandardized solution Standardized solution

III) Estimating the solution using unweighted effects coding (Unstandardized solution) Standardized solution

IV) What if there are more than two levels on categorical scale?

V) Inclusion of control variables VI) Effect size calculation

Page 46: Workshop  Moderated Regression Analysis

46

Descriptives

Page 47: Workshop  Moderated Regression Analysis

47

I) Coding options

Dummy coding (0;1): Allows to compare the effects of X on Y between the reference group (d=0)

and the other group(s) (d=1) Definitely preferred, if you are interested in the specific regression weights for

each group Unweighted effects coding (-1;+1): yields unweighted mean effect of X on

Y across groups Preferred, if you are interested in overall mean effect (e.g., when inserting M

as a nonfocal variable); all groups are viewed in comparison to the unweighted mean effect across groups

Results are directly comparable with ANOVA results when you have 2 or more categorical variables

Weighted effects coding: takes also into account sample size of groups Similar to unweighted effects coding except that the size of each group is

taken into consideration useful for representative panel analyses

Dummy coding (0;1): Allows to compare the effects of X on Y between the reference group (d=0)

and the other group(s) (d=1) Definitely preferred, if you are interested in the specific regression weights for

each group Unweighted effects coding (-1;+1): yields unweighted mean effect of X on

Y across groups Preferred, if you are interested in overall mean effect (e.g., when inserting M

as a nonfocal variable); all groups are viewed in comparison to the unweighted mean effect across groups

Results are directly comparable with ANOVA results when you have 2 or more categorical variables

Weighted effects coding: takes also into account sample size of groups Similar to unweighted effects coding except that the size of each group is

taken into consideration useful for representative panel analyses

Page 48: Workshop  Moderated Regression Analysis

48

II) Estimating the unstandardized solution using dummy coding Unstandardized solution

Dummy-code M (0=reference group; 1=comparison group)

Center X cX Compute product of cX and M Regress Y on cX, M, and cX*M

Page 49: Workshop  Moderated Regression Analysis

49

SPSS Syntax*Create dummy coding.IF (gender=0) genderd = 0 .IF (gender=1) genderd = 1 .

*center height (on grand mean) and compute interaction term.DESC var=height.COMPUTE heightc =height - 173 .

*Compute product term.COMPUTE genderd.heightc = genderd*heightc.

*Regress lifesat on heightc and genderd, adding the interaction term.REGRESSION /DEPENDENT lifesat /METHOD=ENTER heightc genderd /METHOD=ENTER genderd.heightc.

Page 50: Workshop  Moderated Regression Analysis

50

SPSS output

1MwhenX)bb()bb(Y

0MwhenX)b()b(Y

X)Mbb()Mbb(Y

3120

10

3120

b0

b1

b2

b3

Wilhelm Hofmann
aufpoppnde botschaften einfügen...do not interpret standardized coefficients!
Page 51: Workshop  Moderated Regression Analysis

51

Estimating the standardized solution using dummy coding Standardized solution

Dummy-code M (0=reference group; 1=comparison group)

Z-standardize X and YCompute crossproduct of zX and MRegress zY on zX, M, and zX*MThe unstandardized solution from the output

is the correct solution (Friedrich, 1982)!

Page 52: Workshop  Moderated Regression Analysis

52

SPSS Syntax

*compute z-scores of all continuous varialbes involved and then compute interaction term.

DESC var=lifesat height/save.

COMPUTE genderd.zheight = genderd*zheight.EXECUTE .

REGRESSION /DEPENDENT zlifesat /METHOD=ENTER zheight genderd /METHOD=ENTER genderd.zheight.

Page 53: Workshop  Moderated Regression Analysis

53

SPSS output standardized solution

.507 = estimated difference in regression weights between groups

Wilhelm Hofmann
aufpoppnde botschaften einfügen...do not interpret standardized coefficients!
Page 54: Workshop  Moderated Regression Analysis

54

Correct regression equations

MXMXY 073.199.005.966.4ˆ

MzXMzXYz 507.146.036.007.ˆ

Page 55: Workshop  Moderated Regression Analysis

55

Plotting the interaction

Convention: calculate predicted values for high (+1 SD) and low (-1 SD) values of X in both groups of M

Page 56: Workshop  Moderated Regression Analysis

56

Females (reference group; M=0) -1 SD: +1 SD:

Males (M=1) -1 SD: +1 SD:

Unstandardized Plot

547.9)(

073.199.005.966.4ˆ

heightSD

MXMXY

918.4)0547.9(073.)0(199.)547.9(005.966.4ˆ Y

022.4)1547.9(073.)1(199.)547.9(005.966.4ˆ Y

014.5)0547.9(073.)0(199.)547.9(005.966.4ˆ Y

512.5)1547.9(073.)1(199.)547.9(005.966.4ˆ Y

Page 57: Workshop  Moderated Regression Analysis

57

Excel spreadsheet

Adapted from Dawson, 2006

Page 58: Workshop  Moderated Regression Analysis

58

3.8

4

4.2

4.4

4.6

4.8

5

5.2

5.4

5.6

Low Height (-1 SD) High Height (+1 SD)

Lif

e S

atis

fact

ion

Women

Men

Interpreting the unstandardized plot

Mean Height

Intercept for reference group at mean of height (when height is centered)

Slope of height forreference group

163 173 183

Difference in intercept between reference and comparison groupat mean of height

Change in the slope when „going“ from reference group to other group

Page 59: Workshop  Moderated Regression Analysis

59

-1

-0.5

0

0.5

1

Low Height (-1 SD) High Height (+1 SD)

Z-S

tan

dar

diz

ed L

ife

Sat

isfa

ctio

n

Women

Men

Interpreting the standardized plot

Intercept for reference group at mean of height (when height is centered)

Slope of height forreference group

Difference in intercept between both groups at mean of height

Difference in the slope when „going“ from reference group to other group

Page 60: Workshop  Moderated Regression Analysis

60

Simple slope testing

Test of interaction term answers the question: Are the two regression weights in group A and B significantly different from each other?

Simple slope testing answers: Is the regression weight in group A (or B) significantly different from zero?

Page 61: Workshop  Moderated Regression Analysis

61

Simple slope testing

Use dummy coding Simple slope test of the reference group

(women) Is already given in SPSS output as the test of the

conditional effect for M! Simple slope test of the comparison group (men)

Easiest way: recode M such that group B is now the reference group (0). Then do regression analysis all over again.

Page 62: Workshop  Moderated Regression Analysis

62

*Simple slopes comparison group*(recode men=0; women=1).IF (gender=0) genderd2 = 1.IF (gender=1) genderd2 = 0.COMPUTE genderd2.zheight = genderd2*zheight.

REGRESSION /MISSING LISTWISE /DEPENDENT zlifesat /METHOD=ENTER zheight genderd2 /METHOD=ENTER genderd2.zheight.

The effect of height on life satisfaction is significant for men, but not for women.

-1

-0.5

0

0.5

1

Low Height (-1 SD) High Height (+1 SD)

Z-S

tan

dar

diz

ed L

ife

Sat

isfa

ctio

n

Women

Men

= .544, p = .003

= .036, p = .807

Page 63: Workshop  Moderated Regression Analysis

63

III) Estimating the unstandardized solution using unweighted effects coding

Unstandardized solution Effect-code M (-1 = group A; 1 =group B) Center X Compute crossproduct of centered Xc and M Regress Y on Xc, M, and Xc*M Interpret the unstandardized solution from the output

Page 64: Workshop  Moderated Regression Analysis

64

Estimating the standardized solution using unweighted effects coding

Standardized solution (to get the beta-weights) Effect-code M (-1 = group A; 1 =group B) Z-standardize X and Y Compute crossproduct of z-standardized scores for X

and M Regress zY on zX, M, and zX*M Again, the unstandardized solution from the output is

the correct (standardized) solution (Friedrich, 1982)!

Page 65: Workshop  Moderated Regression Analysis

65

SPSS Syntax (standardized solution only)

IF (gender=0) gendere = -1.IF (gender=1) gendere = 1.COMPUTE gendere.zheight = gendere*zheight.

REGRESSION /DEPENDENT zlifesat /METHOD=ENTER zheight gendere /METHOD=ENTER gendere.zheight.

Page 66: Workshop  Moderated Regression Analysis

66

-1.00

-0.50

0.00

0.50

1.00

Low Height High Height

Dep

end

ent

vari

able

Women

Mean Effect

Men

Interpreting the standardized plot

Unweighted grand mean of both groups at mean of height (when height is centered)

Unweighted mean slope across both groups

Difference in intercept between group coded 1 from the unweighted grand mean

Deviation of the slope for the group coded 1 from the unweighted mean slope

Page 67: Workshop  Moderated Regression Analysis

67

To sum up and compare

In dummy coding, the contrasts are with the reference group (0) In unweighted effects coding, the contrasts are with the unweighted

mean of the sample Regression weights for unweighted effects coding equal exactly half

of the weights for dummy coding. Dummy/effects coding does not change the significance test of the

interaction (and the simple slope tests)

Dummy coding Unweighted effects coding

Page 68: Workshop  Moderated Regression Analysis

68

Further issues

V) What if there are more than 2 groups? VI) Adding control variables VII) Computing the effect size for the

interaction term

Page 69: Workshop  Moderated Regression Analysis

69

V) What if there are more than 2 groups? Coding systems can be easily extended to N levels of categorical

variable Example: 3 groups (dummy coding) give you 3 possibilities:

You need N-1 dummy variables Include each dummy and its interaction with other predictor in

equation Interpretation: each dummy captures difference between reference

group and group coded 1 Statistical evaluation of overall interaction effect: R2 change

D1 D2 D1 D2 D1 D2Group 1 0 0 1 0 1 0Group 2 1 0 0 0 0 1Group 3 0 1 0 1 0 0

Group 1 as Base Group 2 as Base Group 3 as Base

Page 70: Workshop  Moderated Regression Analysis

70

V) What if there are more than 2 groups? Example: 3 groups using effects coding:

Interpretation: each coding var captures the difference between group coded 1 and unweighted grand mean

Statistical evaluation of overall interaction effect: R2 change

C1 C2 C1 C2 C1 C2Group 1 1 0 1 0 -1 -1Group 2 0 1 -1 -1 1 0Group 3 -1 -1 0 1 0 1

Option1 Option2 Option3

Page 71: Workshop  Moderated Regression Analysis

71

VI) Adding control variables

Simply add centered covariates as predictors to the unstandardized regression equation (or z-standardized covariates to the standardized regression equation).

Page 72: Workshop  Moderated Regression Analysis

72

VII) Effect size calculation

Again, f2 should be used:

2.

2.

2.2

1 AIY

AYAIY

r

rrf

:

:

2.

2.

AY

AIY

r

r Squared multiple correlation resulting from combined prediction of Y by the additive set of predictors (A) and their interaction (I) (= full model)

Squared multiple correlation resulting from prediction by set A only (= model without interaction term)

Page 73: Workshop  Moderated Regression Analysis

73

Higher-order interactions

Higher-order interactions: interactions among more than 2 variables

All basic principles (centering, coding, probing, simple slope testing, effect size) generalize to higher-order interactions (see Aiken & West, 1991, Chapter 4)

Page 74: Workshop  Moderated Regression Analysis

74

Example

Y: Life satisfaction (continuous) X: Body height (continuous) M1: Age (continuous) M2: Gender (categorical: male vs. female)

Is the moderator effect of age and height different in males and females?

Important: Include all lower-level (e.g., two-way) interactions before inserting the higher-order (e.g., three-way) term!

Page 75: Workshop  Moderated Regression Analysis

75

Syntax

*Standardized solution*compute z-scores of all continuous varialbes involved and then compute two-way

and three way interaction term(s).

*two-way.COMPUTE genderd.zheight = genderd*zheight.COMPUTE genderd.zage = genderd*zage.COMPUTE zheight.zage = zheight*zage.

*three-way.COMPUTE genderd.zheight.zage = genderd*zheight*zage.

REGRESSION /DEPENDENT zlifesat /METHOD=ENTER zheight zage genderd /METHOD=ENTER zheight.zage genderd.zheight genderd.zage /METHOD=ENTER genderd.zheight.zage.

Page 76: Workshop  Moderated Regression Analysis

76

SPSS output

042.185.1

151.185.2

fsizeeffect

Three-way interaction:

p = .090

Page 77: Workshop  Moderated Regression Analysis

77

SPSS output (cont‘d)

Slope of height in females at mean of age

Change in slope of height for males at mean of age

Difference in slope of height for males at mean of age as compared to males 1 SD above the mean of age

Page 78: Workshop  Moderated Regression Analysis

78

Plotting the interaction

Plot first-level moderator effect (e.g., height age) at different levels of the third variable (e.g., gender)

It is best to use separate graphs for that There are 6 different ways to plot the three-way

interaction… Best presentation should be determined by theory In the case of categorical vars it often makes sense to plot

the separate graphs as a function of group The logic to compute the values for different combinations

of high and low values on predictors is the same as in the two-way case

Page 79: Workshop  Moderated Regression Analysis

79

Excel sheet for three-way IA

Adapted from Dawson, 2006

Page 80: Workshop  Moderated Regression Analysis

80

Plotting the three-way interaction

Females

-1

-0.5

0

0.5

1

Low Height High Height

Z-S

tan

dar

diz

ed L

ife

Sat

isfa

ctio

n

Low Age High Age

Males

-1

-0.5

0

0.5

1

Low Height High Height

Z-S

tan

dar

diz

ed L

ife

Sat

isfa

ctio

n

Low Age High Age

=.029+.346 =.375=.375 -.435

= -.06=.029

Page 81: Workshop  Moderated Regression Analysis

81

Simple slope testsThis syntax estimates the beta of the steep slope of

height for males low in age (see previous slide):

*recode group membership.IF (gender=0) genderd2 = 1 .IF (gender=1) genderd2 = 0 .

*transform age.COMPUTE zagebelow=zage+1.

*compute new product terms.COMPUTE zheight.zagebelow=zheight*zagebelow.COMPUTE genderd2.zheight = genderd2*zheight.COMPUTE genderd2.zagebelow = genderd2*zagebelow.COMPUTE zheight.zagebelow = zheight*zagebelow.COMPUTE genderd2.zheight.zagebelow = genderd2*zheight*zagebelow.

REGRESSION /DEPENDENT zlifesat /METHOD=ENTER zheight zagebelow genderd2 /METHOD=ENTER zheight.zagebelow genderd2.zheight

genderd2.zagebelow /METHOD=ENTER genderd2.zheight.zagebelow.

Page 82: Workshop  Moderated Regression Analysis

82

Output simple slope test

Slope of height in males one SD below the mean of age

Page 83: Workshop  Moderated Regression Analysis

83

The challenge of statistical power when testing moderator effects If variables were measured without error, the following

sample sizes are needed to detect small, medium, and large interaction effects with adequate power (80%) Large effect (f2 = .26): N = 26 Medium effect (f2 = .13): N = 55 Small effect (f2 = .02): N = 392

Busemeyer & Jones (1983): reliability of product term of two uncorrelated variables is the product of the reliabilites of the two variables .80 x .80 = .64

Required sample size is more than doubled (trippled) when predictor reliabilites drop from 1 to .80 (.70) (Aiken & West, 1991)

Problem gets even worse for higher-order interactions

Page 84: Workshop  Moderated Regression Analysis

84

Outlook 1: Dichotomous DV

What if the DV is dichotomous (e.g., group membership, voting decision etc.)?

Use moderated logistic regression (Jaccard, 2001)

MXbMbXbb)(Logit 3210

Page 85: Workshop  Moderated Regression Analysis

85

Outlook 2: Moderated Mediation Analysis

X Y

M

Z

MN

Page 86: Workshop  Moderated Regression Analysis

86

Outlook 2: Moderated mediated regression analysis

Preacher, K. J., Rucker, D. D., & Hayes, A. F. (2007).  Assessing moderated mediation hypotheses: Theory, methods, and prescriptions.  Multivariate Behavioral Research, 42, 185-227.

Check out http://www.comm.ohio-state.edu/ahayes/SPSS%20programs/modmed.htm, for a copy of the paper and a convenient spss macro that does all the computations

Page 87: Workshop  Moderated Regression Analysis

87

End of presentation

Thank you very much for your attention!

Page 88: Workshop  Moderated Regression Analysis

88

Appendix

Page 89: Workshop  Moderated Regression Analysis

89

Some don‘ts for Case II

b) Splitting the file and regressing Y on X separately by the two groups- does not control for possible interdependence among predictor and moderator- does not test for difference in regression weights

Difference in regression weights: .428

Useful procedures to get a first feel for the data, but not appropriate tests for interaction:a) Testing the difference in subgroup correlations

- confound true moderator effects with difference in predictor variance (Whisman & McClelland, 2005)- does not control for possible interdependence among predictor and moderator- loss of power

Page 90: Workshop  Moderated Regression Analysis

90

Females (reference group; M=0) -1 SD: +1 SD:

Males (M=1) -1 SD: +1 SD:

Dummy coding: Standardized Plot

043.0)01(507.)0(146.)1(036.007.ˆ Y

029.0)01(507.)0(146.)1(036.007.ˆ Y

696.0)11(507.)1(146.)1(036.007.ˆ Y

1)(

507.146.036.007.ˆ

heightSD

MzXMzXYz

39.0)11(507.)1(146.)1(036.007.ˆ Y

Page 91: Workshop  Moderated Regression Analysis

91

Nonlinear interactions

Change in slopes is monotonic and linear Can also be modelled to be nonlinear

(e.g., curvilinear) See Aiken & West, chapter 5

Page 92: Workshop  Moderated Regression Analysis

92

Taken from Preacher, K. J. (2007). Median splits and extreme groups

Page 93: Workshop  Moderated Regression Analysis

93

Dummy coding

1MwhenX)bb()bb(Y

0MwhenX)b()b(Y

X)Mbb()Mbb(Y

3120

10

3120

Page 94: Workshop  Moderated Regression Analysis

94

Unweighted effects coding

1MwhenX)bb()bb(Y

1MwhenX)bb()bb(Y

X)Mbb()Mbb(Y

3120

3120

3120