8.1 - Role of the Covariate

To illustrate the role the covariate has in the ANCOVA, let’s look at a hypothetical situation wherein investigators are comparing the salaries of male vs. female college graduates. A random sample of 5 individuals for each gender is compiled, and a simple one-way ANOVA is performed:

Males Females
78 80
43 50
103 30
48 20
80 60

\(H_0 \colon \mu_{\text{Males}}=\mu_{\text{Females}}\)

Using SAS

SAS coding for the One-way ANOVA:

data ancova_example;
input gender $ salary;
datalines;
m 78
m 43
m 103
m 48
m 80
f 80
f 50
f 30
f 20
f 60
;
proc mixed data=ancova_example method=type3;
class gender;
model salary=gender;
run;

Here is the output we get:

Type 3 Tests of Fixed Effects
Effect Num DF Den DF F Value Pr > F
gender 1 8 2.11 0.1840

Using Minitab

To perform one-way ANOVA test in Minitab, you can first open the data (Ancova Example Minitab Data) and enter this into a Minitab worksheet.

Go to Stat > ANOVA > One Way…

In the pop-up window that appears, select salary as the Response and gender into Factor as shown below.

Minitab output

Click OK, and then here is the Minitab output that you get.

One-way ANOVA: salary versus gender
Source DF  SS  SS F P
gender 1 1254 1254 2.11 0.184
Error 8 4745 593    
Total 9 6000      

S = 24.35  R-Sq = 20.91%  R-Sq(adj) = 11.02%

Because the p-value > \(\alpha\) (.05), they can’t reject the \(H_0\).

A plot of the data shows the situation:

plot

However, they recognize that the length of time that someone has been out of college is likely to influence how much money they are making. So they also included a question asking how many years they have been out of college (ranging from 1 to 5 years for this sample):

Females Males
Salary years Salary years
80 5 78 3
50 3 43 1
30 2 103 5
20 1 48 2
60 4 80 4
plot

We can see that indeed, there is a general trend for people to earn more the longer they are out of college. The fundamental idea of including a covariate is to take this trending into account and effectively ‘control for’ the number of years they have been out of college. In other words, we hope to include the covariate in the ANOVA so that the comparison between Males and Females can be made without the complicating factor of years out of college.