## ## $coating ## diff lwr upr p adj ## 2-1 3.1642857 1.2523059 5.0762656 0.0006800 ## 3-1 2.7414286 0.8294487 4.6534084 0.0030923 ## 4-1 0.6057143 -1.3062656 2.5176941 0.8181913 ## 3-2 -0.4228571 -2.3348370 1.4891227 0.9278699 ## 4-2 -2.5585714 -4.4705513 -0.6465916 0.0058805 ## 4-3 -2.1357143 -4.0476941 -0.2237344 0.0245887 #The analysis is consistent with the analysis in pairwise.t.test. #Give the plots for result in anova. par(mfrow=c(2,2)) plot(results) #There are 3 plots show the relationship between residuals and fixed values. #For example, the 1st plot, we can see the residuals are not always close to 0, #the residual in 3rd group is larger than in other groups. #The normality is satisfied. #Perform t test to compare the mean haziness between coatings 1 and 2. coatings1<-haziness[1:7] coatings2<-haziness[8:14] #The data size is 7 for coatings1 and coatings2, so we use shapiro.test to check normality. shapiro.test(coatings1) ## ## Shapiro-Wilk normality test ## ## data: coatings1 ## W = 0.9536, p-value = 0.7623 shapiro.test(coatings2) ## ## Shapiro-Wilk normality test ## ## data: coatings2 ## W = 0.9498, p-value = 0.7281 #Both P-values are large enough so we cannot reject data of these two groups low normal distribution. var.test(coatings1, coatings2)
## ## $coating ## diff lwr upr p adj ## 2-1 3.1642857 1.2523059 5.0762656 0.0006800 ## 3-1 2.7414286 0.8294487 4.6534084 0.0030923 ## 4-1 0.6057143 -1.3062656 2.5176941 0.8181913 ## 3-2 -0.4228571 -2.3348370 1.4891227 0.9278699 ## 4-2 -2.5585714 -4.4705513 -0.6465916 0.0058805 ## 4-3 -2.1357143 -4.0476941 -0.2237344 0.0245887 #The analysis is consistent with the analysis in pairwise.t.test. #Give the plots for result in anova. par(mfrow=c(2,2)) plot(results) #There are 3 plots show the relationship between residuals and fixed values. #For example, the 1st plot, we can see the residuals are not always close to 0, #the residual in 3rd group is larger than in other groups. #The normality is satisfied. #Perform t test to compare the mean haziness between coatings 1 and 2. coatings1<-haziness[1:7] coatings2<-haziness[8:14] #The data size is 7 for coatings1 and coatings2, so we use shapiro.test to check normality. shapiro.test(coatings1) ## ## Shapiro-Wilk normality test ## ## data: coatings1 ## W = 0.9536, p-value = 0.7623 shapiro.test(coatings2) ## ## Shapiro-Wilk normality test ## ## data: coatings2 ## W = 0.9498, p-value = 0.7281 #Both P-values are large enough so we cannot reject data of these two groups normal distribution. var.test(coatings1, coatings2) low
PracticeMidterm_R.docx