You are on page 1of 11

2/6/2012

Analysis of Covariance

Analysis of Covariance
Essentially a mixture of ANOVA and control by partialling out Analysis of covariance (ANCOVA) represents a situation where we compute an ANOVA but we want to know if our independent variable(s) produce a significant effect when some other variable has been controlled for.

Analysis of Covariance
The question we are asking is: - given that our participants are not all equal on the covariate and that the covariate is known to be related to the dependent variable, will the independent variable still have a significant effect once a statistical method is used to equate the subjects on the covariate? Following the example used for oneway ANOVA, we might want to know if there are still group differences on BD once the subjects level of education is controlled for

2/6/2012

Analysis of Covariance
- In essence, we aim to determine whether or not group differences would still be found if our subjects all had the same level of education - we use statistical means to equate participants on the covariate
- Because of random assignment, Pedhazur believes that that this is only applicable to purely experimental designs - ANCOVA is not valid for correlational or quasi-experimental design - ANCOVA has been applied in these setting regardless

Assumptions
The relation between the DV and the covariate is linear.
The best fitting regression line is straight If the relation has significant non-linearity, ANCOVA is not useful

With significant non-linearity, it is better to use regression analysis


enter the correct trend first in the equation, followed by the coded vectors for the IV

Assumptions
The second assumption is that the regression coefficients are equal across treatments or experiment groups.
the homogeneity of regression assumption The b in group 1 should be equal to the b in group 2, etc. This assumption is testable by examining the interaction between independent variable and the covariate

The covariate does not have to be continuous

2/6/2012

Assumptions
This is an important assumption when the regression coefficients are different between groups (assumption violated), it means that the covariate and the DV do not follow the same relation in each group In your reading of published literature you will encounter several situations where ANCOVA is used without a test of this assumption. This is an important flaw in any study.

Applications of ANCOVA
Two basic situations 1- When the groups of interest have similar means on the covariate In such a situation, ANCOVA is used to reduce variability that is not related to our hypotheses (random variability)
It allows a more precise test of our hypotheses This is the situation where ANCOVA does the best job

Applications of ANCOVA
2- When the groups differ significantly on the covariate.
we use ANCOVA to calculate adjusted means on the dependent variable.
statistical estimates of what the means would be if the groups did not differ on the covariate

This represents an ANOVA calculated on the adjusted means and using an error term in which the variance accounted for by the covariate has been removed

2/6/2012

Calculations
There are two ways to compute an ANCOVA:
By means of multiple regression By means of GLM

GLM better if all your independent variables are categorical Regression approach better if you have one or more continuous independent variables I will present results obtained with both approaches

Calculations
ANCOVA is actually quite relevant to the data we originally used in one way ANOVA
When we submitted the paper for publication, a reviewer told us that we should consider possible group differences in education. In order to satisfy this reviewer, we calculated an ANCOVA with groups as IV, score on BD as DV, and education (in years) as the covariate

ANOVA Approach Results


First, I calculated the ANOVA without a covariate From the output, you can see that we get an F(2,33) = 11.10, p < .01. However, when we add EDUC as a covariate, we see, first of all, that EDUC produces a significant F(1,32) = 11.71, p < .01.
This finding indicates a significant relation between EDUC and BD, reflecting the significant correlation between these variables (r = .62, p < .01)

2/6/2012

ANOVA Approach Results


More importantly, we can see that the interaction is not significant: F(2,30) = 0.32, p > .73. The assumption of equality of the regression coefficients across treatments is met; ANCOVA is appropriate

Finally, we can see that the F value for the group effect is somewhat reduced, that is, now F(2,32) = 8.21, p < .01.
it is still significant, but controlling for education somewhat reduced the magnitude of the group effect. Adjusted means are reported: Different from original means

Regression Approach
The use of the regression approach to ANCOVA requires extra steps
Categorical variables have to be coded properly The interaction term required for a test of the assumption of equality of the regression coefficients has to be computer

Regression Calculations
We will use dummy coding for our groups
AIS Females Males Vector 1 1 0 0 Vector 2 0 1 0

Created with the following SPSS commands:


if (type eq 1)type1=1. if (type eq 2)type1=0. if (type eq 3)type1=0. if (type eq 1)type2=0. if (type eq 2)type2=1. if (type eq 3)type2=0.

2/6/2012

Regression Calculations
We also calculate an interaction term by cross multiplying our vectors and education:
compute inter1=type1*educ. compute inter2=type2*educ.

We them compute the regression analysis without the covariate with:


REGRESSION /MISSING LISTWISE /STATISTICS COEFF OUTS R ANOVA CHANGE /CRITERIA=PIN(.05) POUT(.10) /NOORIGIN /DEPENDENT bloc /METHOD=ENTER educ /METHOD=ENTER educ type1 type2 /METHOD=ENTER educ type1 type2 inter1 inter2.

Regression Calculations
In the first ANOVA table presented for this procedure, the F value is directly interpretable, because only the group vectors are entered We can see that the F(2,33) = 10.39, p < .01 is the same as what was obtained in the previous analysis. We do not worry about the interaction vectors here
They will be used to test the assumption of homogeneity of the bs

Regression Calculations
In the next analysis, the covariate is entered first in the regression equation
this essentially partials out the effect of this variable on the variables entered after in the regression equation

First, we must test the homogeneity of regression coefficients assumption

2/6/2012

Regression Calculations
This is done by determining whether or not the interaction term produces a significant increment in R square if there is a significant interaction between the IV and the covariate, it means that the covariate has a differential effect on the DV depending on the group A significant interaction thus indicates a violation of the assumption and a rejection of ANCOVA as a valid approach to the problem

Regression Calculations
The test of the assumption is essentially a tests of the increment in R square due to the interaction vectors The SPSS regression procedure does this automatically with the change keyword in this part of the syntax:
/STATISTICS COEFF OUTS R ANOVA CHANGE

We also need to use a sequential (aka hierarchical) entry of the variables in the equation In our example: increment in R square = 0.01 F(2,30) = 0.35, ns. The homogeneity of the regression coefficients assumption is met.

Regression Calculations
For the main effect of group, the process is similar: increment in R square = 0.23 F(2,32) = 8.21, p < .01

This is exactly to what was obtained in the ANOVA approach to ANCOVA. Results are interpreted similarly.

2/6/2012

Adjusted Means
Earlier, I mentioned that a second purpose of ANCOVA is to equate groups on the covariate when they differ on that variable.
This allows the calculation of adjusted means, which give us an idea of how the groups compare when the covariate is taken into account.

The GLM procedure automatically provides adjusted means when a covariate is included
GLM thus easier in that respect

Adjusted Means
Change in adjusted means compared to observed means are greater when large significant group differences are present on the covariate It is also possible to calculate adjusted means by hand in the context of the regression approach to ANCOVA.
This approach gives the same results as what was presented in the GLM procedure It is extremely tedious

Factorial Design and ANCOVA


ANCOVA remains quite similar in a factorial design, except when it comes to testing the homogeneity assumption
The interaction term including all the variable is used to test the assumption

Example: If you have variables a, b, and c represented by one vector each, and the covariate is y
an interaction term representing the product of all these vectors (a*b*c*y) would be used to test the assumption.

Otherwise, calculations are the same as in a regular ANOVA using the regression approach.

2/6/2012

ANCOVA in Multivariate and Repeated Measures Designs


You must typically use GLM in such cases. SPSS computes this like any univariate ANCOVA However, there is a special case

Repeated Measures with Several Covariates


In the case, you have to use MANOVA MANOVA considers each covariate as linked to a corresponding RM condition GLM would make no such distinction and would likely wipe any significant effects that might otherwise remain

Repeated Measures with Several Covariates


A typical situation is found in the design we used to examine repeated measures by computer. We had two visual fields (left, right) and four angles of rotation (0, 50, 100, and 150 degrees) in a mental rotation task. Males and females of low, medium, and high spatial skills were tested.
RT was the dependent variable Accuracy was also measured

2/6/2012

Repeated Measures with Several Covariates


Speed-accuracy tradeoff test.
Significant findings on RT after partialling out accuracy would indicate no tradeoff If the effects disappear, the tradeoff would be considered an important factor

Accuracy in each condition becomes a covariate for RT in the corresponding condition.

Repeated Measures with Several Covariates


I simplified the design with only 2 angles of rotation to make the printout manageable. The command looks like this: manova v1a1rt,v1a2rt, v2a1rt,v2a2rt by sex(1,2), sa(1,3) with v1a1ac,v1a2ac, v2a1ac,v2a2ac /wsfactors=vf(2) angle(2) /pmeans /design.

Repeated Measures with Several Covariates


The effect of the covariate is assessed for each variable
Reflected as regression in each table

It is not significant anywhere except for ANGLE (page 6 of the printout) Speed-accuracy tradeoff could be a concern for this variable

10

2/6/2012

Repeated Measures with Several Covariates


We need to examine the regression analysis table that follows
The B is negative: Speed-accuracy tradeoff would require a positive correlation between RT and accuracy

The adjusted means are presented after each table of relevance, along with the observed (uncorrected) means These are uninterpretable as they make no reference to the variables of relevance

11

You might also like