Upload
ahhhhhhh
View
385
Download
2
Tags:
Embed Size (px)
Citation preview
EPS 625 – ANALYSIS OF COVARIANCE (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 Analysis of Variance This first table identifies the four levels of the between-subjects factors used in the ANCOVA.
Between-Subjects Factors
25252525
1234
PromotionGroup
N
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
1667.436a 7 238.205 5.218 .00017079.570 1 17079.570 374.163 .000
193.595 3 64.532 1.414 .244231.690 1 231.690 5.076 .027
11.363 3 3.788 .083 .9694199.564 92 45.647
126276.000 1005867.000 99
SourceCorrected ModelInterceptPromotionAge
Promotion * AgeErrorTotalCorrected Total
Type III Sumof Squares df Mean Square F Sig.
R Squared = .284 (Adjusted R Squared = .230)a.
ANCOVA EXAMPLE PAGE 2
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
25252525
1234
PromotionGroup
N
The following table provides the UNADJUSTED group means and standard deviations.
Descriptive Statistics
Dependent Variable: Interest Rating in DVD
30.68 6.713 2539.80 6.708 2531.56 6.272 2536.76 7.513 2534.70 7.698 100
Promotion Group1234Total
Mean Std. Deviation N
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 Variancesa
Dependent Variable: Interest Rating in DVD
.022 3 96 .995F df1 df2 Sig.
Tests the null hypothesis that the error variance ofthe dependent variable is equal across groups.
Design: Intercept+Age+Promotiona.
ANCOVA EXAMPLE PAGE 3
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 statistic 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
1656.073a 4 414.018 9.340 .00017505.917 1 17505.917 394.940 .000
249.233 1 249.233 5.623 .0201323.306 3 441.102 9.951 .0004210.927 95 44.326
126276.000 1005867.000 99
SourceCorrected ModelIntercept
AgePromotionErrorTotalCorrected Total
Type III Sumof Squares df Mean Square F Sig.
R Squared = .282 (Adjusted R Squared = .252)a.
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
1656.073a 4 414.018 9.340 .00017505.917 1 17505.917 394.940 .000
249.233 1 249.233 5.623 .020
1323.306 3 441.102 9.951 .0004210.927 95 44.326
126276.000 1005867.000 99
SourceCorrected ModelInterceptAge
PromotionErrorTotalCorrected Total
Type III Sumof Squares df Mean Square F Sig.
R Squared = .282 (Adjusted R Squared = .252)a.
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 4
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 )1(
WT
WB
MSSSMSKSS
+−−
=ω
For our example – we substitute into the formula and get:
201363.326.5911325.1190
326.5911978.132303.1323
326.5911326.44)3(303.1323
326.44000.5867326.44)14(306.13232 ==−=−=
+−−=ω
ω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
30.883a 1.334 28.234 33.53239.882a 1.332 37.238 42.52731.695a 1.333 29.050 34.34136.339a 1.343 33.672 39.006
Promotion Group1234
Mean Std. Error Lower Bound Upper Bound95% Confidence Interval
Covariates appearing in the model are evaluated at the followingvalues: Actual Age = 36.28.
a.
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 5
Profile Plots
4321
Promotion Group
40
38
36
34
32
30
Est
imat
ed M
argi
nal M
eans
Estimated Marginal Means of Interest Rating in DVD
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 6
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
25252525
1234
PromotionGroup
N
Tests of Between-Subjects Effects
Dependent Variable: Interest Rating in DVD
1656.073a 4 414.018 9.340 .00017505.917 1 17505.917 394.940 .000
249.233 1 249.233 5.623 .0201323.306 3 441.102 9.951 .0004210.927 95 44.326
126276.000 1005867.000 99
SourceCorrected ModelInterceptAgePromotionErrorTotalCorrected Total
Type III Sumof Squares df Mean Square F Sig.
R Squared = .282 (Adjusted R Squared = .252)a.
ANCOVA EXAMPLE PAGE 7
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
LMATRIXSubcommand 1:Promotion Group 1 vsPromotion Group 2
Identity Matrix
Zero Matrix
LMATRIXSubcommand 2:Promotion Group 1 vsPromotion Group 3
Identity Matrix
Zero Matrix
LMATRIXSubcommand 3:Promotion Group 1 vsPromotion Group 4
Identity Matrix
Zero Matrix
LMATRIXSubcommand 4:Promotion Group 2 vsPromotion Group 3
Identity Matrix
Zero Matrix
LMATRIXSubcommand 5:Promotion Group 2 vsPromotion Group 4
Identity Matrix
Zero Matrix
LMATRIXSubcommand 6:Promotion Group 3 vsPromotion Group 4
Identity Matrix
Zero Matrix
Contrast Coefficients(L' Matrix)
TransformationCoefficients (M Matrix)Contrast Results (KMatrix)Contrast Coefficients(L' Matrix)
TransformationCoefficients (M Matrix)Contrast Results (KMatrix)Contrast Coefficients(L' Matrix)
TransformationCoefficients (M Matrix)Contrast Results (KMatrix)Contrast Coefficients(L' Matrix)
TransformationCoefficients (M Matrix)Contrast Results (KMatrix)Contrast Coefficients(L' Matrix)
TransformationCoefficients (M Matrix)Contrast Results (KMatrix)Contrast Coefficients(L' Matrix)
TransformationCoefficients (M Matrix)Contrast Results (KMatrix)
1
2
3
4
5
6
ANCOVA EXAMPLE PAGE 8
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 Matrix)a
-8.9990
-8.9991.884
.000-12.739
-5.259
Contrast EstimateHypothesized ValueDifference (Estimate - Hypothesized)
Std. ErrorSig.
Lower BoundUpper Bound
95% Confidence Intervalfor Difference
ContrastL1
InterestRating in DVD
DependentVariable
Based on the user-specified contrast coefficients (L') matrix: PromotionGroup 1 vs Promotion Group 2
a.
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
1011.540 1 1011.540 22.821 .0004210.927 95 44.326
SourceContrast
Error
Sum ofSquares df Mean Square F Sig.
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. To calculate the effect size (adjusted Cohen’s d), we use the following formula:
ANCOVA EXAMPLE PAGE 9
'
''ˆ
error
ki
MS
XXd
−= where 6578.6326.44' ==errorMS
351648.16578.6999.8ˆ ==d = 1.35
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 Matrix)a
-.8120
-.8121.883
.667-4.5512.927
Contrast EstimateHypothesized ValueDifference (Estimate - Hypothesized)
Std. ErrorSig.
Lower BoundUpper Bound
95% Confidence Intervalfor Difference
ContrastL1
InterestRating in DVD
DependentVariable
Based on the user-specified contrast coefficients (L') matrix: PromotionGroup 1 vs Promotion Group 3
a.
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
8.245 1 8.245 .186 .6674210.927 95 44.326
SourceContrast
Error
Sum ofSquares df Mean Square F Sig.
Because no significant difference was found for these two groups – no Effect Size needs to be calculated.
ANCOVA EXAMPLE PAGE 10
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 Matrix)a
-5.4560
-5.4561.901
.005-9.231-1.681
Contrast EstimateHypothesized ValueDifference (Estimate - Hypothesized)
Std. ErrorSig.
Lower BoundUpper Bound
95% Confidence Intervalfor Difference
ContrastL1
InterestRating in DVD
DependentVariable
Based on the user-specified contrast coefficients (L') matrix: PromotionGroup 1 vs Promotion Group 4
a.
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
364.941 1 364.941 8.233 .0054210.927 95 44.326
SourceContrast
Error
Sum ofSquares df Mean Square F Sig.
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.
'
''ˆ
error
ki
MS
XXd
−= 819490.6578.6456.5ˆ ==d = .82
ANCOVA EXAMPLE PAGE 11
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 Matrix)a
8.1870
8.1871.883
.0004.448
11.925
Contrast EstimateHypothesized ValueDifference (Estimate - Hypothesized)
Std. ErrorSig.
Lower BoundUpper Bound
95% Confidence Intervalfor Difference
ContrastL1
InterestRating in DVD
DependentVariable
Based on the user-specified contrast coefficients (L') matrix: PromotionGroup 2 vs Promotion Group 3
a.
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
837.672 1 837.672 18.898 .0004210.927 95 44.326
SourceContrast
Error
Sum ofSquares df Mean Square F Sig.
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.
'
''ˆ
error
ki
MS
XXd
−= 229685.16578.6187.8ˆ ==d = 1.23
ANCOVA EXAMPLE PAGE 12
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 Matrix)a
3.5430
3.5431.895
.065-.2197.305
Contrast EstimateHypothesized ValueDifference (Estimate - Hypothesized)
Std. ErrorSig.
Lower BoundUpper Bound
95% Confidence Intervalfor Difference
ContrastL1
InterestRating in DVD
DependentVariable
Based on the user-specified contrast coefficients (L') matrix: PromotionGroup 2 vs Promotion Group 4
a.
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
154.963 1 154.963 3.496 .0654210.927 95 44.326
SourceContrast
Error
Sum ofSquares df Mean Square F Sig.
Because no significant difference was found for these two groups – no Effect Size needs to be calculated.
ANCOVA EXAMPLE PAGE 13
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 Matrix)a
-4.6440
-4.6441.898
.016-8.411
-.876
Contrast EstimateHypothesized ValueDifference (Estimate - Hypothesized)
Std. ErrorSig.
Lower BoundUpper Bound
95% Confidence Intervalfor Difference
ContrastL1
InterestRating in DVD
DependentVariable
Based on the user-specified contrast coefficients (L') matrix: PromotionGroup 3 vs Promotion Group 4
a.
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
265.410 1 265.410 5.988 .0164210.927 95 44.326
SourceContrast
Error
Sum ofSquares df Mean Square F Sig.
Because no significant difference was found for these two groups – no Effect Size needs to be calculated.