PSY 817: SAS-lab #23
April 18, 1997
Objectives:
1) Analysis of Covariance (ANCOVA)
2) testing for interactions
Objective 1: The Analysis of Covariance (ANCOVA)
You may want to refer back to lab #8 where I first introduced
ANOVAs. This week, we're going to add a covariate and run an ANCOVA. In
addition, to make things more interesting, we'll also add another independent
variable to the model. As before, you will need to used the Jam/U.S. data
set for this objective.
-
Get means and SDs for variable AGGRESS (i.e., aggression) by CULTURE and
SEXCB (separately)
-
Run an ANOVA with CULTURE and SEXCB as the independent variables and AGGRESS
as the dependent variable. Since this is not new material, I am not providing
the SAS code.
-
Now, rerun the same analyses, but this time use AGE as a covariate. Substitute
the following model statement for the one you had in step #2.
model AGGRESS = culture sexcb age ;
-
Look at Type III output. Does partialing out AGE make a difference? How
do you know?
-
Run a post-hoc test to determine the direction for all significant effects
(see lab #8 for details)
Objective 2: testing for interactions So far, we've only
looked at main effects in all our analyses. However, as all of you know,
sometimes there are interactions between two or more different variables.
It's important to test for these interactions. Here's how to do it with
PROC GLM. Please note that the procedure is different for PROC REG.
-
Go back to your ANCOVA in objective 1, step 3.
-
Substitute the following model statement for the one you had.
model AGGRESS = age*sexcb age*culture sexcb*culture age sex
culture;
-
As you can see, I asked for all possible interaction combinations so that
you can see how they are specified. However, there is also a shorter way
to get all interactions. I'll show it to you in class.