How To Do A Two-Way ANOVA in SPSS
How To Do A Two-Way ANOVA in SPSS
In order to run a two-way ANOVA in SPSS, the data need to be arranged a certain way. Each subject has
his/her own row, with information about independent variables and dependent variables in the columns. To do
the exercises on the following pages, you will need to open an empty data spreadsheet in SPSS. First, enter the
values for the dependent variable in one column. You can label this column by clicking on the tab at the bottom
of the window labeled “variable view”. Then click back to “data view”. In the second column, enter
information about the first Independent Variable (the first factor) by assigning names or numbers to each level
(or group) and typing the appropriate level for each participant (row) in the appropriate box in the column.
Next enter the second Independent Variable in a third column by assigning names or numbers to its levels and
entering the appropriate level in the appropriate box for each participant (row).
Depending on which data set you were working with, your spreadsheet start with something like the following:
subj IV1 IV2 depv
1 Male Exper 5
2 Male Exper 5.5
3 Male Control 6
4 Male Control 4.7
5 Female Exper 9
6 Female Exper 6.2
7 Female Control 5.3
Graphing instructions
To get SPSS to print out a graph of the means, click on the “Profile Plots” button in the univariate model
window. In the menu that opens, indicate that you want to use one IV as the first grouping variable on the
horizontal axis. Indicate that you want to use the second IV as he second grouping variable, plotted as separate
lines. Click “continue” and, when you run your analysis, the graph will be printed below the ANOVA table.
You can create a second graph from the same data by switching which IV is on the horizontal axis and which
IV determines the separate lines. Remember, if the two (or more) lines are parallel there is no interaction
between them (no interaction effect) – they do not need to cross over to have an interaction. The different
(separate) lines represent the levels/conditions/groups of one of your IVs, while the points on the X-axis
represent the levels/conditions/groups of the other IV.
HERE'S A TASK
Suppose we take children at three different age levels (3, 4, and 5 years) and teach them one of three different
memory strategies (S1, S2 or S3). Then we give them a free recall memory test for 50 items, with the following
results:
SD
(a) Enter the data on SPSS and save the file. Calculate the means and standard deviations.
(b) Run the appropriate analysis using SPSS. Write in the results in the table below. Asterix those that are
significant at the 5% significance level. Describe your conclusions in words.
age
strategy
age*strategy
Within
Total
(c) Draw two different graphs to illustrate the results (like, a histogram and a line graph).
PART 1
First, let’s test the assumption about equivalent assignment to groups (looking at the pre-manipulation measure
of performance: perform1).
Draw a GRAPH BOXPLOT SIMPLE of the perform1 data with ‘feedcode’ on the category axis. How
does it look? Are You convinced that there were no initial differences?
Have SPSS run an ANOVA for You, the group means and variances:
Go to the ANALYZE menu, choose COMPARE MEANS MEANS, and, using ‘feedcode’ as the independent
variable. Get some descriptives of the groups on the pretest -- minimum, maximum, mean, median – via the
Options button. Do You think there are group differences?
Now run the ANOVA going through ANALYZE COMPARE MEANS ONE-WAY ANOVA, using
"perform1' as the DV and 'feedcode' as the IV. Fill in this table with the results:
Source SS df MS F
Between
treatments
Within
treatments
Total
PART 2
Now let’s take a look at performance after the manipulation. The variable you’ll be looking at is Perform3.
PART 3
Now create a variable that assesses the difference between performance at time 1 and performance at time 3. Do
this through the transform menu compute and put in "P31diff" as the target variable. For the numeric
expression, type in perform3 – perform1. Go through the same steps (boxplot, means, ANOVA) using “P31diff’
as the dependent measure.
Source SS df MS F
Between
treatments
Within
treatments
Total