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 Running the analysis Running a Two Way ANOVA When we run a one-way ANOVA, we used a special menu command for that type of analysis (as you'll see below). But since one can have a broad range of factors in an ANOVA, SPSS has a more general menu command that allows you to do all kinds of ANOVAs (one-way, two-way, three-way, etc.). Click on ANALYZE -> GENERAL LINEAR MODEL -> UNIVARIATE, The dependent box is for the dependent (continuous) variable that you want to analyze. The “Fixed factor” box is for the set of factors (groups) you want to look at. Move the DV into the DV box, using the little arrow button between the fields Move the 1st IV into the Fixed factor box. Move the 2nd IV into the Fixed factor box. Click “ok” and you’ll get your two-way ANOVA table. If you only put one factor into the box, you’d get a one-way ANOVA. If you put in three factors, you’d get a three-way ANOVA. You get the picture. Comparing Individual Means To get SPSS to print out information about the means of the cells, click on the “Options” button in the univariate model window. In the menu that opens, indicate that you want SPSS to display the means for the two factors and their interaction. If you want to run multiple comparison tests on the means, check the “compare main effects” box and indicate what type of multiple comparison you want (LSD, Bonferroni, etc.). Then click “continue” to get back to the univariate model window. When you run the analysis, the information about the means will be printed below the ANOVA table. 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: 3-year-olds S2 31 20 22 23 19 S1 11 18 26 15 14 S3 23 28 35 27 21 S1 23 30 18 28 23 4-year-olds S2 18 24 9 16 13 S3 28 21 30 30 23 5-year-olds S2 30 25 27 35 23 S1 25 30 28 40 20 S3 28 31 26 20 35 M 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. Source of Vbty Between SS df MS F age strategy age*strategy Within Total (c) Draw two different graphs to illustrate the results (like, a histogram and a line graph). (d) What do you conclude from the study? sig A FUNNER TASK Go back to the Claudia.sav dataset (and the descriptions of all the variables You were given). PART 1 First, let’s test the assumption about equivalent assignment to groups (looking at the pre-manipulation measure of performance: perform1). What is the H0? What is the Ha? 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? PERFORM1 scores mean smart hardwork none variance n 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: Go to "Options" and check off “Means plot”. Hit OK and OK. Source Between treatments Within treatments Total SS df MS F So what does that mean, in terms of the hypothesis we were testing? PART 2 Now let’s take a look at performance after the manipulation. The variable you’ll be looking at is Perform3. What is the H0? What is the Ha? Run the ANOVA again. Source Between treatments Within treatments Total SS df MS F What is the significance of the F test? So what does that mean in the statistical sense? What does it mean in the practical application sense? 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. P31DIFF scores mean smart hardwork none variance n What does this variable tell You? Source Between treatments Within treatments Total SS df MS F What is the significance of the F test? So what does that mean in the statistical sense? What does it mean in the practical application sense? PART 5 Think of ways to analyze the data using the tools You’ve learned so far in this class. Are there any hypotheses You would like to investigate? Any predictions? Try ’em out and tell us what You find.