Effect of Pests on Sugar Cane Yield using ANOVA with R

Today, I used R to evaluate the variation in sugar cane weight caused by different pests. The goal was to understand the fundamentals of ANOVA (Analysis of Variation ) and how to interpret the results.

Sugar cane data came from a 1934 study published in the Indian Journal of Statistics. Pests were measured to have a statistically significant impact on sugar cane yield. A Post hoc Tukey test showed that, between the different types of pests, there were no significant differences.
Comparison of Sugar Cane Samples

The boxplot was the best option to graphically represent the data. The difference in mean between the control and the remaining samples strongly suggests that the pests had a significant effect on the yeild. An ANOVA on these results found a significant variation among conditions, F ratio > 1, P-value < 0.05.

Analysis of Variation Results

At a confidence coefficient of 0.95, or 95%, a post hoc Tukey test showed that the sugar yield did not change significantly depending on the type of pests. The Tukey test supported observations from the boxplot, showing that only the control group was significantly different from the remaining groups. In simpler terms, I cannot be 95% sure there is a difference in yeild between various types of pests.

Tukey Test Results

The coding is as follows:

#Variation in Sugar Yeild from Pests
#By Matthew Mano (matthewm3109@gmail.com)
#Import dataset 
#Rename variables and remove unnecessary ones 
sugar$X1[sugar$X1==2]=“TopShoot Borer”
sugar$X1[sugar$X1==3]=“Stem Borer”
sugar$X1[sugar$X1==5]=“Root Borer”
#Create a Boxplot 
boxplot(X64.5~X1,data=sugar,main=“Influence of Pests on Sugar Cane Yield”,xlab=“Pests”,ylab=“Sugar Cane Weight (lb)”,col=“gray88”)
#Analysis of Variation 
sugarc<-aov(X64.5 ~ X1, data = sugar

The link for the dataset is attached: http://bit.ly/1LELKm1

P. C. Mahalanobis and S. S. Bose, “A Statistical Note on the Effect of Pests on the Yield of Sugarcane and the Quality of Cane-Juice,” The Indian Journal of Statistics, vol. 1, no. 4, pp. 399–406, 1934.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s