Code 2
Code 2
Soumya Roy
# Strip Chart
stripchart(delivery~treatment,xlab="Treatment",ylab="Delivery
Time",vertical=T,col="red",pch=24,lwd=2)
##
## Attaching package: 'gplots'
plotmeans(delivery~treatment,xlab="Treatment",ylab="Delivery
Time",col="red",bars=T,barwidth=2,lwd=2)
# One-way ANOVA to check whether the average delivery times are significantly
different
mod_1<-aov(delivery~treatment)
summary(mod_1)
# Multi-factor ANOVA
mod_2<-aov(delivery~crust*coke*bread)
summary(mod_2)
# Plot of Residuals
plot(mod_3,which=c(1,2))
# Normality Check of Residuals
res<-mod_3$res
shapiro.test(res)
##
## Shapiro-Wilk normality test
##
## data: res
## W = 0.94095, p-value = 0.3608
##
## Bartlett test of homogeneity of variances
##
## data: res by crust
## Bartlett's K-squared = 0.82086, df = 1, p-value = 0.3649
bartlett.test(res~coke)
##
## Bartlett test of homogeneity of variances
##
## data: res by coke
## Bartlett's K-squared = 0.22757, df = 1, p-value = 0.6333
bartlett.test(res~bread)
##
## Bartlett test of homogeneity of variances
##
## data: res by bread
## Bartlett's K-squared = 0.20608, df = 1, p-value = 0.6499
TukeyHSD(mod_3)$'crust:coke'