Title | 6. Anova and pairwise comparison SPSS |
---|---|
Course | Introductory Research Skills |
Institution | Bangor University |
Pages | 6 |
File Size | 376.7 KB |
File Type | |
Total Downloads | 49 |
Total Views | 152 |
Coursework...
ANOVA and pairwise comparisons – SPSS Instructions Background This data represents a case study where a farmer wanted to investigate increasing the yield of barley with the use of fertilizers. The data is the weight of barley per unit area (kg/1000m -2) harvested from 60 plots (15 for each treatment).
Initial exploration of the data The data file is ANOVA_data.sav. The value labels have already been added for you. On the Data View you can use this button to toggle between factor numbers and labels: In the Variable view tab, check that all of the variables are set to the correct data type (scale or nominal). The first thing that you should always do is ‘get a feel’ for the data you have. Have a look at the Descriptive Statistics for all of the treatments and look at a plot of the data. Use Graphs > Legacy dialogs > Error bar > Simple > Define > Variable: Harvest Category axis: Treatment > OK.
What does this tell you about the likely result of a test for difference between the 4 treatments? Do the treatments appear to have similar variability?
Kolmogorov-Smirnov test for normality Since ANOVA is a parametric test you should test to see if your data is approximately normally distributed before you decide that ANOVA is appropriate for your data. Analyze > Nonparametric Tests > Legacy Dialogs > 1-Sample K-S > put all 4 treatments in the Test Variable List > OK. One-Sample Kolmogorov-Smirnov Test Nitrogen N Normal Parametersa,b
Most Extreme Differences
15 Mean
Phosphorus 15
Potassium
Control
15
15
107.6000
99.8667
95.1333
89.8000
5.99762
4.65781
4.98378
4.58569
Absolute
.193
.190
.184
.149
Positive
.158
.190
.182
.149
Negative
Std. Deviation
-.193
-.104
-.184
-.117
Kolmogorov-Smirnov Z
.748
.736
.713
.578
Asymp. Sig. (2-tailed)
.630
.650
.690
.892
a. Test distribution is Normal. b. Calculated from data.
Levene test for equal variances Since ANOVA works by comparing the variability between samples with the variability within samples, it is very important that you test for homogeneity of variance before you apply an ANOVA test. You can select this test under Options when you run the ANOVA
ANOVA test for difference with a post hoc pairwise comparison test Analyze > Compare means > One-Way ANOVA > Dependent List: Harvest Factor: Treatment Options > select Homogeneity of Variance Test > Continue Post Hoc > select Tukey > Continue
SPSS Output Oneway Test of Homogeneity of Variances Harvest Levene Statistic
df1
.960
df2 3
Sig. 56
.418
ANOVA Harvest Sum of Squares
df
Mean Square
Between Groups
2565.933
3
855.311
Within Groups
1449.467
56
25.883
Total
4015.400
59
F
Sig.
33.045
.000
Post Hoc Tests Multiple Comparisons Dependent Variable: Harvest Tukey HSD (I) Treatment
(J) Treatment
Mean Difference
Std. Error
Sig.
(I-J)
Phosphorus
1.85772
.001
2.8143
12.6524
Potassium
12.46667*
1.85772
.000
7.5476
17.3857
Control
17.80000*
1.85772
.000
12.8810
22.7190
Nitrogen
-7.73333*
1.85772
.001
-12.6524
-2.8143
4.73333
1.85772
.063
-.1857
9.6524
*
1.85772
.000
5.1476
14.9857
*
-12.46667
1.85772
.000
-17.3857
-7.5476
-4.73333
1.85772
.063
-9.6524
.1857
*
1.85772
.029
.4143
10.2524
*
1.85772
.000
-22.7190
-12.8810
*
-10.06667
1.85772
.000
-14.9857
-5.1476
-5.33333*
1.85772
.029
-10.2524
-.4143
Potassium
Nitrogen Phosphorus Control Nitrogen Control
Upper Bound
7.73333
Control
Potassium
Lower Bound *
Phosphorus Nitrogen
95% Confidence Interval
Phosphorus Potassium
10.06667
5.33333 -17.80000
*. The mean difference is significant at the 0.05 level.
Homogeneous Subsets Harvest Tukey HSD Treatment
N
Subset for alpha = 0.05 1
2
3
Control
15
Potassium
15
95.1333
Phosphorus
15
99.8667
Nitrogen
15
Sig.
89.8000
107.6000 1.000
.063
1.000
Means for groups in homogeneous subsets are displayed. a. Uses Harmonic Mean Sample Size = 15.000.
Questions 1. What was the result of the test for normality? Was it significant? 2. What was the result of the test for homogeneity of variance? Was it significant? 3. Based on the results of these two tests, was a parametric test for difference appropriate? 4. Why were ANOVA and the post hoc pairwise comparison test used, rather than using multiple t-tests? 5. The results could be reported as follows. Make sure that you can identify where to find each of the values, for each of the 4 tests, in the SPSS output tables.
There was no significant deviation from a normal distribution for any of the treatments (Kolmogorov-Smirnov tests: Nitrogen: Z = 0.748, p > 0.05; Phosphorous: Z = 0.736, p > 0.05; Potassium: Z = 0.713, p > 0.05; Control: Z = 0.578, p > 0.05). There was no significant difference between the variances (Levene: F = 0.96, p > 0.05) so a parametric test was appropriate. There was a significant difference in yield of barley between the 4 treatments (ANOVA, F3,56 = 33.05, p < 0.001). A post hoc Tukey test showed that there was no significant difference between phosphorous and potassium (p = 0.063) but all other pairwise combinations were significantly different (p < 0.05).
6. Add to these results by making at least 2 interesting statements about differences between the treatments. Support your statements by reporting means, with units and with a measure of variability such as standard error if appropriate.
Kruskal-Wallis test If the data is not interval scale; the sample sizes are not approximately equal; any of the samples of data are not normally distributed or the sample variances are not approximately equal then the data does not meet the assumptions for a parametric test. The non-parametric test for a difference between 3 or more samples is a Kruskal-Wallis test. Try applying this test to the same set of data and compare the results: Analyze > Nonparametric Tests > Legacy Dialogs > K Independent Samples Select Kruskal-Wallis H Test Variable List: Harvest Grouping Variable: Treatment Define Range: Minimum: 1 Maximum: 4 Continue > OK When you report the results of a Kruskal-Wallis test you can call the test statistic either chisquare or H...