> dat<-read.table("Raw_data4.txt",header=T) > dat[,1]<-as.factor(dat[,1]) > grp<-dat[,1] > bartlett.test(dat$Height~grp) Bartlett test of homogeneity of variances data: dat$Height by grp Bartlett's K-squared = 6.5467, df = 5, p-value = 0.2566 > bartlett.test(dat$Weight~grp) Bartlett test of homogeneity of variances data: dat$Weight by grp Bartlett's K-squared = 1.1449, df = 5, p-value = 0.95 > nest<-as.factor(c(rep(1,4),rep(2,5),rep(3,4),rep(4,5),rep(1,4),rep(2,5),rep(3,4), + rep(4,4),rep(1,15),rep(2,21),rep(3,17),rep(4,16))) > main<-as.factor(c(rep(1,18),rep(2,17),rep(3,69))) > tra<-dat$Height > out<-lm(tra~main+main/nest) > anova(out) Analysis of Variance Table Response: tra Df Sum Sq Mean Sq F value Pr(>F) main 2 4148.5 2074.3 113.1457 <2e-16 *** main:nest 9 102.0 11.3 0.6182 0.7787 Residuals 92 1686.6 18.3 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > TukeyHSD(aov(out), "main") Tukey multiple comparisons of means 95% family-wise confidence level Fit: aov(formula = out) $main diff lwr upr p adj 2-1 -20.008170 -23.45778 -16.558560 0.0000000 3-1 -4.433575 -7.13315 -1.733999 0.0005092 3-2 15.574595 12.81277 18.336425 0.0000000 > tra<-dat$Weight > out<-lm(tra~main+main/nest) > anova(out) Analysis of Variance Table Response: tra Df Sum Sq Mean Sq F value Pr(>F) main 2 2437.8 1218.9 11.0902 4.842e-05 *** main:nest 9 1299.5 144.4 1.3137 0.2406 Residuals 92 10111.5 109.9 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > TukeyHSD(aov(out), "main") Tukey multiple comparisons of means 95% family-wise confidence level Fit: aov(formula = out) $main diff lwr upr p adj 2-1 -16.37092 -24.817299 -7.9245310 0.0000372 3-1 -5.93285 -12.542772 0.6770719 0.0877798 3-2 10.43806 3.675713 17.2004162 0.0011453 >