In: Math
1. Using the 'pulp' data from the faraway package in R, determine whether there are any differences between the operators. What is the nature of these differences? (Note; You must do multiple comparisons). Please use R or R studio code. Thanks!
> library(faraway) #loading library 'FARAWAY'
> pulp
bright operator
1 59.8 a
2 60.0 a
3 60.8 a
4 60.8 a
5 59.8 a
6 59.8 b
7 60.2 b
8 60.4 b
9 59.9 b
10 60.0 b
11 60.7 c
12 60.7 c
13 60.5 c
14 60.9 c
15 60.3 c
16 61.0 d
17 60.8 d
18 60.6 d
19 60.5 d
20 60.5 d
> attach(pulp)
> model=aov(bright~operator) #Fitting One-way ANOVA
> summary(model)
Df Sum Sq Mean Sq F value Pr(>F)
operator 3 1.34 0.4467 4.204 0.0226 *
Residuals 16 1.70 0.1063
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Since p-value = 0.0226 < 0.05, we reject the null
hypothesis of no difference among the operators and conclude that
there is significant difference among the operators.
#Post ANOVA - Tukey HSD test
> TukeyHSD(model)
Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = bright ~ operator)
$operator
diff lwr upr p adj
b-a -0.18 -0.76981435 0.4098143 0.8185430
c-a 0.38 -0.20981435 0.9698143 0.2903038
d-a 0.44 -0.14981435 1.0298143 0.1844794
c-b 0.56 -0.02981435 1.1498143 0.0657945
d-b 0.62 0.03018565 1.2098143 0.0376691
d-c 0.06 -0.52981435 0.6498143 0.9910783
Out of all the pairs, we observe that the pair(b,d) is significantly different since the p-value is less than 0.05 and all the others are > 0.05.