SWK 3401.4-5.3 One-Way Analysis of Variance (Anova) Exercise
INTRODUCTION
The purpose of this activity is to learn how to use Excel in conducting a one-way analysis of variance (Anova) and how to evaluate the results. We will continue to use the Safe At Home data and the readiness to change scores at program entry. This time we will analyze the readiness scores in terms of a 4-category categorical variable: who used substances during the precipitating incident of intimate partner violence (no one, only “me”, only “partner”, and both “me and my partner”). The null hypothesis is similar to what we have seen in the past:
H0: The difference in mean readiness to change scores between the four groups is zero.
Another way that this is sometimes written, which helps us remember the limitation of an “omnibus” analysis of variance (all categories compared at once) is that the four population means are equal (remember, μ is the symbol for population mean):
μ1= μ2= μ3= μ4
The resulting test will tell us if there is a statistically significant difference, it will not tell us “where” the statistically significant differences lie (which group or groups differ). For that, we will need post hoc analyses.
INSTRUCTIONS
- Open the data file named battertx Anova start.xlsx. You will need to select enable editing to work with this file.
- Once again, we are faced with the problem that our data set is not configured the way that Excel needs it to be configured to conduct this analysis. We need to do the same thing that we did for the independent samples t-test: this time we need to create 4 columns of data to be compared.
- The first step, you may recall, was to sort the data on the grouping variable to make it easy to pick up just the values we need to create those 4 new columns of data. Remember, we need to “select all” data to perform a meaningful sort (without sorting just the selected variable). So, select all, then go to “data” tab on the top menu bar and select “sort” on the next menu. You want to sort the data on the variable called “subwho” (the variable name for data about who in the relationships used substances during the event). Using the default options of cell values and the smallest to largest order is fine. When you click “ok” you should see that:
- the “0” group (no one used substances) runs from cell E2:E195,
- the “1” (only the client used) runs from cell E196:E255,
- the “2” group (only the partner used) runs from cell E256:E276, and
- the “3” group (both partners used) runs from E277:E370.
- As before, you now need to copy the values for each group on the variable of interest, preintervention readiness to change (redypre is the variable name and it appears in column L) into four new columns beginning with row 2, then place a label for each column in row 1. Recommended here is to put data from the 0s group (L2:L195) in column O, 1s group (L196:L255) in column P, 2s group L256:L276) in column Q, and 3s group (L277:L370) in column R, using copy/paste commands. NOTE: Remember that a “variable” label cannot begin with a number–you type out the zero, one, two, three instead, into cells O1, P1, Q1, and R1..
- Once you have your 4 new columns of data, you are ready to request the analysis. Now, the “0s” group (no one used substances) runs from cell O1:O195), the “1s” (only the client used) runs from cell P1:P61, the “2s” group (only the partner used) runs from cell Q1:Q22, and the “3s” group (both partners used) runs from R1:R95 with the “variable” lables in the first row of each column.
- To run the analysis, select the “data” tab in the top menu bar, then “data analysis.” In the data analysis selection menu, you want the one called Anova: single factor—this is what a one-way analysis of variance is called in Excel.
- To fill in the dialogue box, note that data for this analysis begins in cell O1 and ends in cell R95. The syntax for the input range should be typed as: $O$1:$R$95 (since we want the labels to show in our output), and the box for labels should be checked. We grouped the data in columns so that option should be checked, and the first row of each column is a label for each “variable” so that box should be checked. A nice place to put the output (output range) is starting in cell T2.
- Voila! You have the results of the analysis! After sliding the column width for T a little to the right, you can see the following:
- 4 groups were compared (none, ones, twos, threes).
- the size of each group is n=94 (none), n=60 (ones), n=21 (twos), and n=94 (threes).
- the mean values on readiness to change for each group are M=4.58 for nobody (none), M=4.72 for me only (ones), M=4.04 for partner only (twos), and M=4.86 for both of us (threes).
- the degrees of freedom for our “omnibus” analysis are dfbetween groups=3 and dfwithin groups=265.
- the computed F-statistic is 3.067 and the critical value for comparison at α=.05, with 3 and 265 degrees of freedom was 2.63 (F crit).
- the p-value computed for our data was p=.028.
- These results lead us to reject the null hypothesis that all 4 group means were equal because the computed p=.028 is less than our α=.05 value.
- This would lead an investigator to look into the differences more deeply, using post hoc analyses (that we have not yet learned) to determine WHERE the difference(s) exist–this obmnibus analysis just tells us that somewhere across our 4 groups there IS a difference. However, just looking at the group means, we see that one stands out from the others—the mean readiness to change scores for the group where only the partner reportedly used substances (M=4.04) was lower than mean for the other three groups (M=4.58, 4.72, and 4.86). This suggests that this difference is worth looking into, but we should probably not ignore the other pairs of contrasts entirely.
- Feel free to compare your output to the file named battertx Anova finish.xlsx. If you obtained the same results and drew the same conclusions, you have successfully completed this learning activity!