Upload
duongthuy
View
216
Download
3
Embed Size (px)
Citation preview
Chat 151. Notes 9d: One-way ANCOVA
1.1 Purpose
(a) Basics
Analysis of covariance = ANCOVA
ANCOVA is similar to ANOVA
ANCOVA is also similar to regression
(b) Type of Study and Statistical Adjustments
Research ScenariosANCOVA is suitable when one wishes to compare two or more groups while also taking into account possible confounding variables.
AdjustmentsANCOVA can be helpful for providing statistical adjustments that allow us to estimate what difference may exist if both groups had similar covariate scores.
ExampleWe wish to learn whether a recently purchases tutorial program helps students with science scores. The tutorial program is implemented in Class A while Class B does not use the tutorial program.
For example, if both groups had a mean score of 100.60 on IQ, what would be the predicted (estimated) mean scores on the posttest for both classes?
Tutorial Use
IQ Mean Posttest Score Mean
Adjusted Posttest Score Mean (assumes IQ = 100.6
in both classes)Class A Yes 103.60 88.20 86.01Class B No 97.60 74.20 76.39
Note. Adjusted scores based upon IQ mean of 100.60.
(c) Graphical Display of Statistical Adjustments
85 90 95 100 105 110 11560
65
70
75
80
85
90
95
100
Class A
IQ Scores
Postt
est S
core
s
Recall that regression lines can be used to make predictions. Someone with an IQ = 90 would be predicted to score what on the posttest for Class B? IQ = 105, what is predicted Posttest for those in Class A?
Question Using this model, is there a differential benefit of the tutorial depending upon one’s IQ level? That is, do students with IQs below 95 benefit more, or less, from using the tutorial than students with an IQ of 105 or greater?
How do we answer this?
To answer, calculate the mean difference between Classes A and B for an IQ of 95, then again for IQ of 105. If the mean difference in posttest scores is about the same, then there is no differential benefit of the tutorial due to IQ.
[Draw line and move up and down range of IQ to show constant tutorial difference]
Same difference due to parallel regression lines for both groups.
Example below shows non-parallel regression lines (also known as an interaction) which leads to varying mean differences among groups.
One assumption of ANCOVA is that there is parallel regression lines, i.e., no interaction between the covariate and the factor (grouping variable). This assumption is known as homogeneity of regression.
If the assumption is violated, this is not a true concern as some texts would have you believe because the interaction can be easily modeled, explained, and used to make predictions. The only issue is that one cannot make overall multiple comparisons among groups, rather, one must perform tests called simple main effects.
1.2 SPSS Commands
Use these data
http://www.bwgriffin.com/gsu/courses/edur8131/data/chat_14_ancova_example_1.sav
IQ Posttest Class94 77 197 86 1
101 90 199 85 1
103 86 1106 87 1108 94 1
104 90 1111 95 1113 92 188 63 091 72 095 76 093 71 097 72 0
100 73 0102 80 098 76 0
105 81 0107 78 0
1. Analyze, General Linear Model, Univariate2. Variables:
DV (Posttest) to “Dependent Variable” box Factor (Class) to “Fixed Factor(s)” box Covariate (IQ) to “Covariate(s)” box
3. Options: Move “Class” to “Display Means for” box Select “Compare Main Effects” (and choose Bonferroni if more than 2 groups) Select “Descriptive Statistics”
See images below
1. Analyze, General Linear Model, Univariate
2. Variables: DV (Posttest) to “Dependent Variable” box Factor (Class) to “Fixed Factor(s)” box
Covariate (IQ) to “Covariate(s)” box
3. Options: Move “Class” to “Display Means for” box Select “Compare Main Effects” (and choose Bonferroni if more than 2 groups) Select “Descriptive Statistics”
SPSS Results
Descriptive StatisticsDependent Variable: PosttestClass Mean Std.
DeviationN
.00 74.2000 5.24510 101.00 88.2000 5.24510 10Total 81.2000 8.81148 20
Note observed, unadjusted means above. Note that Class 1 = A, Class 0 = B.
Tests of Between-Subjects EffectsDependent Variable: PosttestSource Type III Sum
of Squaresdf Mean
SquareF Sig.
Corrected Model
1334.704a 2 667.352 80.750 .000
Intercept 3.899 1 3.899 .472 .501IQ 354.704 1 354.704 42.919 .000Class 363.928 1 363.928 44.035 .000Error 140.496 17 8.264Total 133344.000 20Corrected Total
1475.200 19
a. R Squared = .905 (Adjusted R Squared = .894)
The above table shows the ANCOVA summary calculations. The rows in green are those numbers one would report.
Adjusted (predicted) means can be found in the table below. SPSS calls adjusted means “Estimated Marginal Means.”
Estimated Marginal MeansEstimates
Dependent Variable: PosttestClass Mean Std.
Error95% Confidence Interval
Lower Bound Upper Bound.00 76.391a .969 74.348 78.4351.00 86.009a .969 83.965 88.052a. Covariates appearing in the model are evaluated at the following values: IQ = 100.6000.
Recall table from above:
Tutorial Use
IQ Mean Observed Posttest
Score Mean
Adjusted Posttest Score Mean (assumes IQ = 100.6
in both classes)Class A Yes 103.60 88.20 86.01Class B No 97.60 74.20 76.39
Note. Adjusted scores based upon IQ mean of 100.60.
2. Regression and ANCOVA Correspondence
ANCOVA is mathematically equivalent to regression. One may use a regression equation to obtained predicted means for both groups, and these predicted means are the same as the adjusted or marginal means produced by ANCOVA above.
Regression equation for predicting mean posttest scores using IQ and the dummy variable (coded 0 and 1) for class.
Posttest’ = b0 + b1 (IQ) + b2 (class)
SPSS Regression Results
Prediction Equation
Posttest’ = 2.909 + .73 (IQ) + 9.617 (class)
QuestionWhat is predicted Posttest mean for Class B (class = 0) if IQ = 100.6?
What is predicted Posttest mean for Class A (class = 1) if IQ = 100.6?
AnswerClass B Posttest = 2.909 + .73 (100.6) + 9.617 (0)
= 2.909 + .73*(100.6) = 2.909 + 73.438 = 76.347
Class A Posttest = 2.909 + .73 (100.6) + 9.617 (1)= 2.909 + 73.438 + 9.617 = 2.909 + 83.055= 85.964
ANCOVA resultsEstimated Marginal Means
EstimatesDependent Variable: PosttestClass Mean Std.
Error95% Confidence IntervalLower Bound
Upper Bound
.00 76.391a .969 74.348 78.4351.00 86.009a .969 83.965 88.052a. Covariates appearing in the model are evaluated at the following values: IQ = 100.6000.
Rounding error differences between predicted means using regression and marginal means using ANCOVA; the difference is due to use of more precision internally in SPSS prediction equation than displayed in regression results.
3. Obtaining Predicted Means with ANCOVA for different values of covariate
QuestionWhat is predicted Posttest mean for Classes A and B if IQ = 95?
RegressionPrediction Equation
Posttest’ = 2.909 + .73 (IQ) + 9.617 (class)
QuestionWhat is predicted Posttest mean for Class B (class = 0) if IQ = 95?What is predicted Posttest mean for Class A (class = 1) if IQ = 95?
AnswerClass B Posttest = 2.909 + .73 (95) + 9.617 (0)
= 2.909 + .73*(95) = 2.909 + 69.35 = 72.259
Class A Posttest = 2.909 + .73 (95) + 9.617 (1)= 2.909 + 69.35 + 9.617 = 81.876
ANCOVAHow can we use ANCOVA command in SPSS.
Answer Use Paste function and change estimated mean values
UNIANOVA Posttest BY Class WITH IQ /METHOD = SSTYPE(3) /INTERCEPT = INCLUDE /EMMEANS = TABLES(Class) WITH(IQ=MEAN) COMPARE ADJ(LSD) /PRINT = DESCRIPTIVE PARAMETER /CRITERIA = ALPHA(.05) /DESIGN = IQ Class .
UNIANOVA Posttest BY Class WITH IQ /METHOD = SSTYPE(3) /INTERCEPT = INCLUDE /EMMEANS = TABLES(Class) WITH(IQ=95) COMPARE ADJ(LSD) /PRINT = DESCRIPTIVE PARAMETER /CRITERIA = ALPHA(.05) /DESIGN = IQ Class .
Recall regression estimatesClass B Posttest = 72.259Class A Posttest = 81.876
QuestionWhat is predicted Posttest mean for Classes A and B if IQ = 105?
What values obtained via SPSS ANCOVA command?
Answer
4. Multiple Comparisons
Same as with ANOVA; see below. Difference is that ANCOVA performs multiple comparisons on adjusted means, not observed means like ANOVA.
5. APA Style Presentation (without Interactions)
ExampleIs there a difference in overall mean MPG among country/area of origin of cars (American, European, and Japanese) controlling for vehicle weight and horse power.
http://www.bwgriffin.com/gsu/courses/edur8132/data/cars_with_dummies.sav
First, is there a difference in MPG by origin? Use SPSS to run a one-way ANOVA with Origin as the factor and MPG as the dependent variable.
What F ratio do you obtain?
AnswerStandard One-way ANOVA output:
What explains this difference in MPG by origin? Can weight of vehicle or horse power of engine explain why there is a 10 MPG difference between American and Japanese cars?
Run ANCOVA model:MPG = intercept + Origin + Weight + Horse
Is Origin now significant once Weight and Horse power are taken into account?What is the new F ratio obtained for Origin in the ANCOVA model?
Answer
What are the predicted (adjusted) means for MPG by Origin?
Answers
APA Style
Table 1ANCOVA Results and Descriptive Statistics for MPG by Origin and Vehicle Weight and HorsepowerOrigin MPG
Observed Mean
Adjusted Mean
SD n
American 20.08 22.76 6.42 244European 27.60 23.72 6.58 68Japanese 30.45 25.51 6.09 79Source SS df MS FOrigin 307.60 2 153.80 8.88*Weight 1360.80 1 1360.80 78.56*Horsepower 408.64 1 408.64 23.59*Error 6686.24 386 17.32Note. R2 = .72, Adj. R2 = .71, adjustments based on Weight mean = 2,973.1 lbs and Horsepower = 104.24. Homogeneity of regression tested and not significant: F = 0.67, p>.05. Weight and Horsepower regression coefficient were -.01* and -.05*, respectively. * p < .05
EDUR 8131 – ignore note in light blue.
Table 2Multiple Comparisons and Mean Differences in MPG by Origin
Comparison Adjusted Mean Difference
s.e. Bonferroni Adjusted95% CI
American vs. European -0.96 .64 -2.50, 0.58American vs. Japanese -2.74* .65 -4.31, -1.18Japanese vs. European 1.78* .70 0.11, 3.46Note. Comparisons based upon ANCOVA adjusted means controlling for Weight (= 2,973.1 lbs) and Horsepower (= 104.24). * p < .05, where p-values are adjusted using the Bonferroni method.
ANCOVA results show that there are mean differences in MPG based upon vehicle origin after controlling for both vehicle weight and horsepower. Both weight and horsepower were statistically associated with MPG. The greater the vehicle weight, the lower anticipated MPG; similarly, the greater the horsepower, the lower MPG. Multiple comparison results show that Japanese vehicles are expected to have greater MPG than either American or European cars, and there is little difference between American and European cars.
Material below not covered in EDUR 81315. Interaction
Data from this experiment come from an EdS study dated fall 2010. RATA (Read Aloud, Think Aloud) is a reading comprehension strategy. The EdS student designed this study to learn whether RATA could be helpful to 4th grade students facing mathematics word problems. Two classes were involved – one used RATA and one did not. Below are pretest and posttest mathematics scores for the two groups.
http://www.bwgriffin.com/gsu/courses/edur8131/data/read_aloud_ANCOVA_interaction.sav
Test for interaction between covariate and grouping variable.
How to do this?
6. Comparisons with Interactions
Table 2Comparisons of Mean Differences in Posttest by Study Condition (RATA vs. control)Achievement Comparison by Study
Condition for Levels of Pretest Performance
Estimated Mean
Difference
Standard Error of
Difference95% CI
Math. Pretest = 45.38RATA vs. Control -19.42* 6.54 -32.72, -6.11
Math. Pretest = 59.38RATA vs. Control -9.58 4.98 -19.72, 0.56
Math. Pretest = 73.38RATA vs. Tutor Only 0.25 7.67 -15.35, 15.85
Note. Comparisons based upon ANCOVA adjusted means controlling for Mathematics Pretest with the scores specified within the table.* p < .05.
PRETEST = 59.38
PRETEST = 45.38
PRETEST = 73.38
6. APA Style Presentation (with Interactions)