d=read.table("mont-etch.dat",header=T, colClasses=c("factor","numeric"))
a=aov(rate~power,data=d)
summary(a)
Df Sum Sq Mean Sq F value Pr(>F) power 3 66871 22290 66.8 2.88e-09 *** Residuals 16 5339 334 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
head(d)
power | rate |
---|---|
160 | 575 |
160 | 542 |
160 | 530 |
160 | 539 |
160 | 570 |
180 | 565 |
levels(factor(d$power))
plot(a)
plot(TukeyHSD(a,ordered=T))
## also fine
library(multcomp)
tuk <- glht(a, linfct = mcp(power = "Tukey"))
plot(cld(tuk))
Loading required package: mvtnorm Loading required package: survival Loading required package: TH.data Loading required package: MASS Attaching package: ‘MASS’ The following object is masked from ‘package:dplyr’: select Attaching package: ‘TH.data’ The following object is masked from ‘package:MASS’: geyser