Top Banner
Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field
31
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 1

Analysis of Covariance, ANCOVA (GLM2)

Prof. Andy Field

Page 2: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 2

Aims

• When and Why do we use ANCOVA?

• Partitioning Variance• Carrying out on IBM SPSS• Interpretation

– Main Effects– Covariates

Page 3: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 3

When And Why

• To test for differences between group means when we know that an extraneous variable affects the outcome variable.

• Used to control known extraneous variables.

Page 4: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 4

Advantages of ANCOVA

• Reduces Error Variance– By explaining some of the

unexplained variance (SSR) the error variance in the model can be reduced.

• Greater Experimental Control:– By controlling known extraneous

variables, we gain greater insight into the effect of the predictor variable(s).

Page 5: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 5

Variance

SSR

Error in Model

SSM

Improvement Due to the Model

SST

Total Variance In The Data

SSRCovariate

Page 6: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 6

An Example

• We will use Field’s (2013) Viagra example (from the ANOVA lecture).– There are several possible confounding

variables – e.g. Partner’s libido, medication.

• We can conduct the same study but measure partner’s libido over the same time period following the dose of Viagra.– Outcome (or DV) = Participant’s libido– Predictor (or IV) = Dose of Viagra (Placebo,

Low & High)– Covariate = Partner’s libido

Page 7: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Relationships between the IV and Covariate

Page 8: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Homogeneity of Regression Slopes

Page 9: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 9

Page 10: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 10

How Does ANCOVA Work?

• Imagine we had just two groups:– Placebo– Low Dose

• This paradigm can be expressed as a regression equation using a dummy coding variable:

ii

ii

DosebbLibido

XbbY

10

10

Page 11: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 11

Dummy Coding• Dummy Coding

– Placebo = 0, Low Dose = 1– When Dose = Placebo, Predicted Libido

= mean of placebo group:

– When Dose = Low Dose, Predicted Libido = mean of Low Dose group:

1

1

01 1

bXX

XbX

bbX

PlaceboLowDose

PlaceboLowDose

LowDose

Page 12: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 12

ANOVA As Regression• We can run a regression with Libido as

the outcome and the Dose (Placebo or Low) as the predictor, Note:– Intercept is the mean of Placebo group– b for the Dummy Variable is the difference

between the means of the placebo and low dose group (4.88-3.22 = 1.66)

Coefficientsa

3.222 .547 5.888 .000

1.653 .798 .472 2.072 .056

(Constant)

Dummy Variable 1(Placebo vs. Low)

Model1

B Std. Error

UnstandardizedCoefficients

Beta

StandardizedCoefficients

t Sig.

Dependent Variable: Libidoa.

Page 13: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 13

ANCOVA• ANCOVA extends this basic idea.• The covariate can be added to the

regression model of the ANOVA.• To evaluate the effect of the

experimental manipulation controlling for the covariate we enter the covariate into the model first (think back to hierarchical regression).

Covariate210 bXbbY ii

iii bDosebbLibido Libido sPartner'210

Page 14: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 14

To Recap

• To control for the effect of a covariate all we do is do a multiple regression in which we enter the covariate in the first step.

• We enter Dose in a second step• The result is that we see the effect of

dose above and beyond the effect of the covariate.

Coefficientsa

.421 .534 .788 .443

.596 .082 .883 7.293 .000

-.362 .440 -.824 .424

.872 .094 1.291 9.295 .000

-1.847 .487 -.527 -3.795 .002

(Constant)

Partner's Libido

(Constant)

Partner's Libido

Dummy Variable 1(Placebo vs. Low)

Model1

2

B Std. Error

UnstandardizedCoefficients

Beta

StandardizedCoefficients

t Sig.

Dependent Variable: Libidoa.

Page 15: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 15

Page 16: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 16

4.854.883.22

0

1

2

3

4

5

Placebo Low High

1.66

Page 17: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

ANCOVA on IBM SPSS

Slide 17

Page 18: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Contrasts

Slide 18

Page 19: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Options

Slide 19

Page 20: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 20

Without the Covariate

Tests of Between-Subjects Effects

Dependent Variable: Libido

16.844a 2 8.422 2.416 .108

535.184 1 535.184 153.522 .000

16.844 2 8.422 2.416 .108

94.123 27 3.486

683.000 30

110.967 29

SourceCorrected Model

Intercept

DOSE

Error

Total

Corrected Total

Type III Sumof Squares df Mean Square F Sig.

R Squared = .152 (Adjusted R Squared = .089)a.

Page 21: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Output

Slide 21

Page 22: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 22

Output Continued

Page 23: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 23

SPSS Output: Contrasts

Page 24: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Output: Pairwise Comparisons

Page 25: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 25

4.854.883.22

0

1

2

3

4

5

Placebo Low High

3.22

4.88 4.85

Unadjusted Means

Page 26: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 26

The Main Effect

2.934.71

5.15

0

2

4

6

8

10

Placebo Low High

F(2, 26) = 4.14, p < .05

Page 27: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Slide 27

The Covariate

F(1, 26) = 4.96, p < .05

Page 28: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Calculating the Effect Size of Main Effects

Page 29: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Calculating Effect Size of Contrasts

Page 30: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Reporting Main Effects

• The covariate, partner’s libido, was significantly related to the participant’s libido, F(1, 26) = 4.96, p = .035, r = .40. There was also a significant effect of Viagra on levels of libido after controlling for the effect of partner’s libido, F(2, 26) = 4.14, p = .027, partial η2 = .24.

Page 31: Slide 1 Analysis of Covariance, ANCOVA (GLM2) Prof. Andy Field.

Reporting Contrasts

• Planned contrasts revealed that having a high dose of Viagra significantly increased libido compared to having a placebo, t(26) = −2.77, p = .01, r = .48, but not compared to having a low dose, t(26) = −0.54, p = .59, r = .11.