<<

EPS 625 – (ANCOVA) EXAMPLE USING THE GENERAL LINEAR MODEL PROGRAM

ANCOVA One Continuous Dependent Variable (DVD Rating) – Interest Rating in DVD One Categorical/Discrete Independent Variable (Promotion) with four levels (Promotion Group 1, 2, 3, and 4) One Continuous Covariate (Age) – Actual Age of Consumer

Research Question: Is there a difference in interest ratings of a DVD depending on which type of promotion is provided controlling for differences in the actual age of the consumer?

ANCOVA Syntax to test the Assumption of Regression (Slopes)

UNIANOVA DVDRating BY Promotion WITH Age /METHOD = SSTYPE(3) /INTERCEPT = INCLUDE /CRITERIA = ALPHA(.05) /DESIGN = Promotion Age Age*Promotion .

Univariate

This first table identifies the four levels of the between-subjects factors used in the ANCOVA.

Between-Subjects Factors

N Promotion 1 25 Group 2 25 3 25 4 25

This analysis is done to check the assumption of homogeneity of regression slopes, not to test the main hypothesis. The factor (Promotion Group) and covariate (Actual Age) do not interact [p (.969) >  (.05)], so the assumption of homogeneity of regression slopes has been met.

Tests of Between-Subjects Effects

Dependent Variable: Interest Rating in DVD Type III Sum Source of Squares df Mean Square F Sig. Corrected Model 1667.436a 7 238.205 5.218 .000 Intercept 17079.570 1 17079.570 374.163 .000 Promotion 193.595 3 64.532 1.414 .244 Age 231.690 1 231.690 5.076 .027 Promotion * Age 11.363 3 3.788 .083 .969 Error 4199.564 92 45.647 Total 126276.000 100 Corrected Total 5867.000 99 a. R Squared = .284 (Adjusted R Squared = .230)

ANCOVA Syntax to test the Assumption of Homogeneity of Variance, Linear Relationship between the Covariate and the Dependent Variable, and the Main Hypothesis

UNIANOVA DVDRating BY Promotion WITH Age /METHOD = SSTYPE(3) /INTERCEPT = INCLUDE /PLOT = PROFILE( Promotion ) /EMMEANS = TABLES(Promotion) WITH(Age=MEAN) /PRINT = DESCRIPTIVE HOMOGENEITY /CRITERIA = ALPHA(.05) /DESIGN = Age Promotion . Syntax for ANCOVA to test the main hypothesis

Univariate Analysis of Variance

This first table identifies the four levels of the between-subjects factors used in the ANCOVA.

Between-Subjects Factors

N Promotion 1 25 Group 2 25 3 25 4 25

The following table provides the UNADJUSTED group means and standard deviations.

Descriptive

Dependent Variable: Interest Rating in DVD Promotion Group Mean Std. Deviation N 1 30.68 6.713 25 2 39.80 6.708 25 3 31.56 6.272 25 4 36.76 7.513 25 Total 34.70 7.698 100

The following table is the Levene’s Test of Homogeneity of Variance. As we can see – this assumption is met since p (.995) >  (.05).

Levene's Test of Equality of Error Varianceas

Dependent Variable: Interest Rating in DVD F df1 df2 Sig. .022 3 96 .995 Tests the null hypothesis that the error variance of the dependent variable is equal across groups. a. Design: Intercept+Age+Promotion

ANCOVA EXAMPLE PAGE 2 If the Assumption of Homogeneity of Variance had not be met (found significant) – this is not a major problem if the cell sizes are equal (i.e., the largest group size is not more than 1½ times greater than the smallest group size). This is the case for two reasons, first, the ANCOVA is a robust statistic and second, because of the way SPSS calculates the ANCOVA (Leech, Barrett, & Morgan, 2005).

The following table actually serves two purposes… First, we use it to test if there is a linear relationship between the covariate and the dependent variable. As we can see – there is a (significant) linear relationship between the covariate (Age) and the dependent variable (DVD Rating) since p (.020) < α (.05).

Tests of Between-Subjects Effects

Dependent Variable: Interest Rating in DVD Type III Sum Source of Squares df Mean Square F Sig. Corrected Model 1656.073a 4 414.018 9.340 .000 Intercept 17505.917 1 17505.917 394.940 .000 Age 249.233 1 249.233 5.623 .020 Promotion 1323.306 3 441.102 9.951 .000 Error 4210.927 95 44.326 Total 126276.000 100 Corrected Total 5867.000 99 a. R Squared = .282 (Adjusted R Squared = .252)

The following table is the test of the main hypothesis… Here we see that the Promotion Group Main Effect is significant [p (.000) <  (.05)] controlling for the effect of age. Because we found a significant main effect – and there are more than two levels for the independent variable – we will need to conduct follow-up procedures (i.e., post hoc procedures or multiple comparisons tests) to determine significant pairwise differences.

Tests of Between-Subjects Effects

Dependent Variable: Interest Rating in DVD Type III Sum Source of Squares df Mean Square F Sig. Corrected Model 1656.073a 4 414.018 9.340 .000 Intercept 17505.917 1 17505.917 394.940 .000 Age 249.233 1 249.233 5.623 .020 Promotion 1323.306 3 441.102 9.951 .000 Error 4210.927 95 44.326 Total 126276.000 100 Corrected Total 5867.000 99 a. R Squared = .282 (Adjusted R Squared = .252)

The covariate is included in the analysis to control for differences on this variable and is not the focus of the main analysis (it is used to test the linear relationship between the covariate and the dependent variable as noted above). Consequently, the results of the covariate are frequently not reported in a Results section. ANCOVA EXAMPLE PAGE 3 Since we found a significant between-subjects main effect, we will want to calculate the measure of association, omega squared (ω2). Calculating the measure of association (omega squared) for the ANCOVA is very similar to that for the One-Way ANOVA. We only need to make a few minor adjustments to the formula – to account for the adjusted values of interest…

' ' 2 SS B − (K −1)MSW ω = ' ' SST + MSW

For our example – we substitute into the formula and get:

1323.306 − (4 −1)44.326 1323.303 − (3)44.326 1323.303 −132.978 1190.325 ω 2 = = = = = .201363 5867.000 + 44.326 5911.326 5911.326 5911.326

ω2 = .20, which means that the four levels of promotion group (the independent variable) account for approximately 20% of the total variance in the individual’s interest rating of the DVD (the dependent variable) controlling for the effect of the actual age of the individuals (the covariate).

Estimated Marginal Means

The following table shows the adjusted group means… These means are adjusted for the covariate.

Promotion Group

Dependent Variable: Interest Rating in DVD 95% Confidence Interval Promotion Group Mean Std. Error Lower Bound Upper Bound 1 30.883a 1.334 28.234 33.532 2 39.882a 1.332 37.238 42.527 3 31.695a 1.333 29.050 34.341 4 36.339a 1.343 33.672 39.006 a. Covariates appearing in the model are evaluated at the following values: Actual Age = 36.28.

Note the difference between the unadjusted and the adjusted means… For this example – they are relatively the same – however, depending on the effect (influence) of the covariate – these means can be notably different.

ANCOVA EXAMPLE PAGE 4 Profile Plots

Estimated Marginal Means of Interest Rating in DVD

40

38 s n a e M

l

a 36 n i g r a M

d 34 e t a m i t s

E 32

30

1 2 3 4 Promotion Group

The Profile Plot will give us a visual picture of what is going on with our study. As we can see the line represents the estimated marginal means for the interest rating in DVD at each of the levels of promotion. These values correspond to those found in the estimated marginal means table.

Post hoc Analyses

Because we found a significant between-subjects main effect – and there are four levels to our independent variable – we will need to conduct a follow-up test to determine where any significant pairwise differences are.

One option is to use the lmatrix syntax command which uses the appropriate error term to make pairwise comparisons. We will still need to control for Type I error. While there are several methods from which to choose – we will use the Bonferroni adjustment (alpha divided by the number of comparisons).

ANCOVA EXAMPLE PAGE 5 Syntax for the lmatrix command

UNIANOVA DVDRating BY Promotion WITH Age /METHOD = SSTYPE(3) /lmatrix 'Promotion Group 1 vs Promotion Group 2' promotion 1 -1 0 0 /lmatrix 'Promotion Group 1 vs Promotion Group 3' promotion 1 0 -1 0 /lmatrix 'Promotion Group 1 vs Promotion Group 4' promotion 1 0 0 -1 /lmatrix 'Promotion Group 2 vs Promotion Group 3' promotion 0 1 -1 0 /lmatrix 'Promotion Group 2 vs Promotion Group 4' promotion 0 1 0 -1 /lmatrix 'Promotion Group 3 vs Promotion Group 4' promotion 0 0 1 -1.

Because we use the top three lines of the ANCOVA syntax – we will get a few redundant tables… i.e., the Between-Subjects Factors and the Tests of Between-Subjects Effects. These can be ignored here.

Univariate Analysis of Variance

Between-Subjects Factors

N Promotion 1 25 Group 2 25 3 25 4 25

Tests of Between-Subjects Effects

Dependent Variable: Interest Rating in DVD Type III Sum Source of Squares df Mean Square F Sig. Corrected Model 1656.073a 4 414.018 9.340 .000 Intercept 17505.917 1 17505.917 394.940 .000 Age 249.233 1 249.233 5.623 .020 Promotion 1323.306 3 441.102 9.951 .000 Error 4210.927 95 44.326 Total 126276.000 100 Corrected Total 5867.000 99 a. R Squared = .282 (Adjusted R Squared = .252)

ANCOVA EXAMPLE PAGE 6 The following table provides a summary of the lmatrix syntax that we just requested. For this analysis – there is no pertinent information contained in this table – as such, it too can be ignored.

Custom Hypothesis Tests Index 1 Contrast Coefficients LMATRIX (L' Matrix) Subcommand 1: Promotion Group 1 vs Promotion Group 2 Transformation Identity Matrix Coefficients (M Matrix) Contrast Results (K Zero Matrix Matrix) 2 Contrast Coefficients LMATRIX (L' Matrix) Subcommand 2: Promotion Group 1 vs Promotion Group 3 Transformation Identity Matrix Coefficients (M Matrix) Contrast Results (K Zero Matrix Matrix) 3 Contrast Coefficients LMATRIX (L' Matrix) Subcommand 3: Promotion Group 1 vs Promotion Group 4 Transformation Identity Matrix Coefficients (M Matrix) Contrast Results (K Zero Matrix Matrix) 4 Contrast Coefficients LMATRIX (L' Matrix) Subcommand 4: Promotion Group 2 vs Promotion Group 3 Transformation Identity Matrix Coefficients (M Matrix) Contrast Results (K Zero Matrix Matrix) 5 Contrast Coefficients LMATRIX (L' Matrix) Subcommand 5: Promotion Group 2 vs Promotion Group 4 Transformation Identity Matrix Coefficients (M Matrix) Contrast Results (K Zero Matrix Matrix) 6 Contrast Coefficients LMATRIX (L' Matrix) Subcommand 6: Promotion Group 3 vs Promotion Group 4 Transformation Identity Matrix Coefficients (M Matrix) Contrast Results (K Zero Matrix Matrix)

ANCOVA EXAMPLE PAGE 7 This first set of information provides the pairwise comparison of Promotion Group 1 vs. Promotion Group 2.

Custom Hypothesis Tests #1 Note the -8.999 – this is the adjusted mean difference of Promotion Group 1 (M = 30.883) and Promotion Group 2 (M = 39.882). The negative value is simply because of the order (low – high = negative). Typically, we would report the absolute value (i.e., 9.00).

Contrast Results (K Matrixa)

Dependent Variable Interest Contrast Rating in DVD L1 Contrast Estimate -8.999 Hypothesized Value 0 Difference (Estimate - Hypothesized) -8.999 Std. Error 1.884 Sig. .000 95% Confidence Interval Lower Bound -12.739 for Difference Upper Bound -5.259 a. Based on the user-specified contrast coefficients (L') matrix: Promotion Group 1 vs Promotion Group 2

Note the footnote (a) provides a reminder of which groups are being compared… that is, provided we indicated that in the lmatrix syntax. While the above table also indicates significance – it does not provide us with the F values needed to put into a report.

The following table provides the necessary information to determine if the group difference is significant. In this case we see F(1, 95) = 22.821, p < .001 – indicating that Promotion Group 1 is significantly different from Promotion Group 2. This is compared to our adjusted alpha level (Bonferroni adjustment) of .0083 (/3 = .05/6 = .0083). A review of the group means shows that Promotion Group 1 (M = 30.883) is significantly lower than Promotion Group 2 (M = 39.882) on their DVD interest levels controlling for age.

Test Results

Dependent Variable: Interest Rating in DVD Sum of Source Squares df Mean Square F Sig. Contrast 1011.540 1 1011.540 22.821 .000 Error 4210.927 95 44.326

Because we found a significant difference – we will need to follow this up with the calculation of an . Don’t forget to use the appropriate error term (MS’W = 44.326) which we get from the above table. To calculate the effect size (adjusted Cohen’s d), we use the following formula:

ANCOVA EXAMPLE PAGE 8 ' ' X i − X k dˆ = where MS ' = 44.326 = 6.6578 ' error MSerror 8.999 dˆ = = 1.351648 = 1.35 6.6578

This next set of information provides the pairwise comparison of Promotion Group 1 vs. Promotion Group 3.

Custom Hypothesis Tests #2

Note the -.812 – this is the adjusted mean difference of Promotion Group 1 (M = 30.883) and Promotion Group 3 (M = 31.695). The negative is simply because of the order (low – high = negative). Typically, we would report the absolute value (i.e., .81).

Contrast Results (K Matrixa)

Dependent Variable Interest Contrast Rating in DVD L1 Contrast Estimate -.812 Hypothesized Value 0 Difference (Estimate - Hypothesized) -.812 Std. Error 1.883 Sig. .667 95% Confidence Interval Lower Bound -4.551 for Difference Upper Bound 2.927 a. Based on the user-specified contrast coefficients (L') matrix: Promotion Group 1 vs Promotion Group 3

The following table provides the necessary information to determine if the group difference is significant. In this case we see F(1, 95) =.186, p = .667 – indicating that Promotion Group 1 is not significantly different from Promotion Group 3. This is compared to our adjusted alpha level (Bonferroni adjustment) of .0083 (/3 = .05/6 = .0083). A review of the group means shows that while Promotion Group 1 (M = 30.883) is lower than Promotion Group 3 (M = 31.695) on their DVD interest levels controlling for age, it is not significantly different.

Test Results

Dependent Variable: Interest Rating in DVD Sum of Source Squares df Mean Square F Sig. Contrast 8.245 1 8.245 .186 .667 Error 4210.927 95 44.326

Because no significant difference was found for these two groups – no Effect Size needs to be calculated.

ANCOVA EXAMPLE PAGE 9 This next set of information provides the pairwise comparison of Promotion Group 1 vs. Promotion Group 4.

Custom Hypothesis Tests #3

Note the -5.456 – this is the adjusted mean difference of Promotion Group 1 (M = 30.883) and Promotion Group 4 (M = 36.339). The negative is simply because of the order (low – high = negative). Typically, we would report the absolute value (i.e., 5.46).

Contrast Results (K Matrixa)

Dependent Variable Interest Contrast Rating in DVD L1 Contrast Estimate -5.456 Hypothesized Value 0 Difference (Estimate - Hypothesized) -5.456 Std. Error 1.901 Sig. .005 95% Confidence Interval Lower Bound -9.231 for Difference Upper Bound -1.681 a. Based on the user-specified contrast coefficients (L') matrix: Promotion Group 1 vs Promotion Group 4

The following table provides the necessary information to determine if the group difference is significant. In this case we see F(1, 95) = 8.233, p = .005 – indicating that Promotion Group 1 is significantly different from Promotion Group 4. This is compared to our adjusted alpha level (Bonferroni adjustment) of .0083 (/3 = .05/6 = .0083). A review of the group means shows that Promotion Group 1 (M = 30.883) is significantly lower than Promotion Group 4 (M = 36.339) on their DVD interest levels controlling for age.

Test Results

Dependent Variable: Interest Rating in DVD Sum of Source Squares df Mean Square F Sig. Contrast 364.941 1 364.941 8.233 .005 Error 4210.927 95 44.326

Because we found a significant difference – we will need to follow this up with the calculation of an Effect Size. Don’t forget to use the appropriate error term (MS’W = 44.326) which we get from the above table.

' ' X i − X k 5.456 dˆ = dˆ = = .819490 = .82 ' 6.6578 MSerror

ANCOVA EXAMPLE PAGE 10 This next set of information provides the pairwise comparison of Promotion Group 2 vs. Promotion Group 3.

Custom Hypothesis Tests #4

Note the 8.187 – this is the adjusted mean difference of Promotion Group 2 (M = 39.882) and Promotion Group 3 (M = 31.695).

Contrast Results (K Matrixa)

Dependent Variable Interest Contrast Rating in DVD L1 Contrast Estimate 8.187 Hypothesized Value 0 Difference (Estimate - Hypothesized) 8.187 Std. Error 1.883 Sig. .000 95% Confidence Interval Lower Bound 4.448 for Difference Upper Bound 11.925 a. Based on the user-specified contrast coefficients (L') matrix: Promotion Group 2 vs Promotion Group 3

The following table provides the necessary information to determine if the group difference is significant. In this case we see F(1, 95) = 18.898, p < .001 – indicating that Promotion Group 2 is significantly different from Promotion Group 3. This is compared to our adjusted alpha level (Bonferroni adjustment) of .0083 (/3 = .05/6 = .0083). A review of the group means shows that Promotion Group 2 (M = 39.882) is significantly higher than Promotion Group 3 (M = 31.695) on their DVD interest levels controlling for age.

Test Results

Dependent Variable: Interest Rating in DVD Sum of Source Squares df Mean Square F Sig. Contrast 837.672 1 837.672 18.898 .000 Error 4210.927 95 44.326

Because we found a significant difference – we will need to follow this up with the calculation of an Effect Size. Don’t forget to use the appropriate error term (MS’W = 44.326) which we get from the above table.

' ' X i − X k 8.187 dˆ = dˆ = = 1.229685 = 1.23 ' 6.6578 MSerror

ANCOVA EXAMPLE PAGE 11 This next set of information provides the pairwise comparison of Promotion Group 2 vs. Promotion Group 4.

Custom Hypothesis Tests #5

Note the 3.543 – this is the adjusted mean difference of Promotion Group 2 (M = 39.882) and Promotion Group 4 (M = 36.339).

Contrast Results (K Matrixa)

Dependent Variable Interest Contrast Rating in DVD L1 Contrast Estimate 3.543 Hypothesized Value 0 Difference (Estimate - Hypothesized) 3.543 Std. Error 1.895 Sig. .065 95% Confidence Interval Lower Bound -.219 for Difference Upper Bound 7.305 a. Based on the user-specified contrast coefficients (L') matrix: Promotion Group 2 vs Promotion Group 4

The following table provides the necessary information to determine if the group difference is significant. In this case we see F(1, 95) = 3.496, p = .065 – indicating that Promotion Group 2 is not significantly different from Promotion Group 4. This is compared to our adjusted alpha level (Bonferroni adjustment) of .0083 (/3 = .05/6 = .0083). A review of the group means shows that while Promotion Group 2 (M = 39.882) is higher than Promotion Group 4 (M = 36.339) on their DVD interest levels controlling for age, it is not significantly different.

Test Results

Dependent Variable: Interest Rating in DVD Sum of Source Squares df Mean Square F Sig. Contrast 154.963 1 154.963 3.496 .065 Error 4210.927 95 44.326

Because no significant difference was found for these two groups – no Effect Size needs to be calculated.

ANCOVA EXAMPLE PAGE 12 This next set of information provides the pairwise comparison of Promotion Group 3 vs. Promotion Group 4.

Custom Hypothesis Tests #6

Note the -4.644 – this is the adjusted mean difference of Promotion Group 3 (M = 31.695) and Promotion Group 4 (M = 36.339). The negative is simply because of the order (low – high = negative). Typically, we would report the absolute value (i.e., 4.64).

Contrast Results (K Matrixa)

Dependent Variable Interest Contrast Rating in DVD L1 Contrast Estimate -4.644 Hypothesized Value 0 Difference (Estimate - Hypothesized) -4.644 Std. Error 1.898 Sig. .016 95% Confidence Interval Lower Bound -8.411 for Difference Upper Bound -.876 a. Based on the user-specified contrast coefficients (L') matrix: Promotion Group 3 vs Promotion Group 4

The following table provides the necessary information to determine if the group difference is significant. In this case we see F(1, 95) = 5.988, p = .016 – indicating that Promotion Group 3 is not significantly different from Promotion Group 4. This is compared to our adjusted alpha level (Bonferroni adjustment) of .0083 (/3 = .05/6 = .0083). A review of the group means shows that while Promotion Group 3 (M = 31.695) is lower than Promotion Group 4 (M = 36.339) on their DVD interest levels controlling for age, it is not significantly different.

Test Results

Dependent Variable: Interest Rating in DVD Sum of Source Squares df Mean Square F Sig. Contrast 265.410 1 265.410 5.988 .016 Error 4210.927 95 44.326

Because no significant difference was found for these two groups – no Effect Size needs to be calculated.

ANCOVA EXAMPLE PAGE 13