Analysis of the Airquality2 data, using Ozone as the response variable and Month as the single grouping factor.

Prepared by Jonathan Godfrey

Group summaries

Level Mean Standard deviation n Standard error
5 23.61538 22.22445 26 4.358573
6 29.44444 18.20790 9 6.069301
7 59.11538 31.63584 26 6.204298
8 59.96154 39.68121 26 7.782126
9 31.44828 24.14182 29 4.483024

The ratio of the largest group standard deviation to the smallest is 2.18

Comparative boxplots

Comparative boxplots

 This graph has 5 boxplots printed vertically
 with the title: 
 "" appears on the x-axis.
 "" appears on the y-axis.
 Tick marks for the y-axis are at: 0, 50, 100, and 150 
 Group 5 has 26 values.
 An outlier is marked at: 115 
 The whiskers extend to 1 and 45 from the ends of the box, 
 which are at 11 and 32 
 The median, 18 is 33 % from the lower end of the box to the upper end.
 The upper whisker is 1.3 times the length of the lower whisker.
 Group 6 has 9 values.
 An outlier is marked at: 71 
 The whiskers extend to 12 and 39 from the ends of the box, 
 which are at 20 and 37 
 The median, 23 is 18 % from the lower end of the box to the upper end.
 The upper whisker is 0.25 times the length of the lower whisker.
 Group 7 has 26 values.
 There are no outliers marked for this group 
 The whiskers extend to 7 and 135 from the ends of the box, 
 which are at 35 and 80 
 The median, 60 is 56 % from the lower end of the box to the upper end.
 The upper whisker is 1.96 times the length of the lower whisker.
 Group 8 has 26 values.
 There are no outliers marked for this group 
 The whiskers extend to 9 and 168 from the ends of the box, 
 which are at 28 and 84 
 The median, 52 is 43 % from the lower end of the box to the upper end.
 The upper whisker is 4.42 times the length of the lower whisker.
 Group 9 has 29 values.
 An outlier is marked at: 96 78 73 91 
 The whiskers extend to 7 and 47 from the ends of the box, 
 which are at 16 and 36 
 The median, 23 is 35 % from the lower end of the box to the upper end.
 The upper whisker is 1.22 times the length of the lower whisker.

Comparative dotplots

Warning in dotplot.formula(Ozone ~ Month, xlab = "Ozone", ylab = "Month"):
The dotplot command is a wrapper for stripchart, and is not a base R
function.

Comparative dotplots

This graph has 5 dotplots printed horizontally
with the title: 
"" appears on the x-axis.
"" appears on the y-axis.
Tick marks for the x-axis are at: 0, 50, 100, and 150 
the data that range from 1 to 168 has been broken into 6 bins.
The counts are:
5: 18 7 0 0 1 0 
6: 5 3 1 0 0 0 
7: 5 7 9 4 1 0 
8: 7 6 7 3 2 1 
9: 19 6 2 2 0 0 

One-way Analysis of Variance


The p value for Month is 0

The ratios of the group standard deviations to the overall standard deviation 
 (groups ordered by increasing mean) are:
 0.76 0.62 1.08 1.35 0.82

             Df Sum Sq Mean Sq F value   Pr(>F)    
Month         4  29438    7359   8.536 4.83e-06 ***
Residuals   111  95705     862                     
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
37 observations deleted due to missingness

Residual analysis

Tests for homogeneity of Variance


    Bartlett test of homogeneity of variances

data:  Ozone by Month
Bartlett's K-squared = 13.451, df = 4, p-value = 0.00927

    Fligner-Killeen test of homogeneity of variances

data:  Ozone by Month
Fligner-Killeen:med chi-squared = 19.341, df = 4, p-value =
0.0006736

Tukey Honestly Significant Difference test

For term Month the comparisons which are significant at 5% are:
7 and 5 with a difference of 35.5 and P-value of 3e-04 
8 and 5 with a difference of 36.35 and P-value of 2e-04 
7 and 9 with a difference of 27.67 and P-value of 0.0062 
8 and 9 with a difference of 28.51 and P-value of 0.0043 
  Tukey multiple comparisons of means
    95% family-wise confidence level
    factor levels have been ordered

Fit: aov(formula = Ozone ~ Month, data = airquality2)

$Month
          diff         lwr      upr     p adj
6-5  5.8290598 -25.6630930 37.32121 0.9858842
9-5  7.8328912 -14.1594735 29.82526 0.8603562
7-5 35.5000000  12.9158068 58.08419 0.0002795
8-5 36.3461538  13.7619606 58.93035 0.0001869
9-6  2.0038314 -29.0666371 33.07430 0.9997676
7-6 29.6709402  -1.8212127 61.16309 0.0749128
8-6 30.5170940  -0.9750588 62.00925 0.0622826
7-9 27.6671088   5.6747440 49.65947 0.0061535
8-9 28.5132626   6.5208979 50.50563 0.0043387
8-7  0.8461538 -21.7380394 23.43035 0.9999733

Plot of Tukey HSD