To implement the one way ANOVA using R programming.
#One way ANOVA
#Input
View(iris)
input<-iris$Sepal.Width
input1<-iris$Species
#Box Plot
boxplot(input~input1,col=c(“green”,”yellow”,”blue”),horizontal=FALSE)
title(main = “Box Plot”,xlab = “Species”,ylab = “Petal.Width”)
#Normality of data of each group
#Histogram
#install.packages(“FSA”)
library(“FSA”)
hist(Sepal.Length~Species,data=iris,col=c(“red”,”yellow”,”blue”))
#Mean value
mean_val<-round(tapply(input,input1,mean),digits = 2)
print(mean_val)
#Plotting Means
#install.packages(“gplots”)
library(“gplots”)
plotmeans(input~input1,col = “red”,mean.labels = TRUE,pos=4,xlab = “Species”,ylab = “Petal Width”,main=”Plot of Petal Width means by Species”,pch=15,cex=1)