detach(tab) tab1=read.table("clipboard",h=T) tab1 attach(tab1) treatment sample chloro abund rich WB LC SS with 2 48 19 2 19 0 0 with 3 45.5 81 2 80 1 0 with 7 46.8 32 3 31 0 1 with 8 45.6 74 1 74 0 0 with 11 40.6 26 4 23 0 3 with 12 46.7 112 2 112 0 0 with 13 43.4 96 2 95 1 0 with 14 39 155 1 155 0 0 with 15 38.5 30 3 29 0 1 with 16 38.3 317 4 314 2 1 with 17 44.6 156 4 154 1 1 with 19 42.9 51 1 51 0 0 with 20 40.7 111 4 110 0 1 with 21 37.8 28 1 28 0 0 with 22 48.8 43 1 43 0 0 with 24 52.2 17 1 17 0 0 with 25 45.9 109 3 107 1 1 with 26 45.4 180 2 180 0 0 with 27 43.8 9 2 7 0 2 with 28 48.3 8 4 5 2 1 with 29 44.4 50 1 50 0 0 with 30 43.6 50 7 47 2 1 with 40 40.9 507 4 505 1 1 with 41 52.5 125 5 119 1 5 with 43 52.9 22 2 21 1 0 with 44 48.2 381 3 380 1 0 with 45 46.9 168 2 168 0 0 wo 1 40.2 23 1 23 0 0 wo 2 40.3 24 1 24 0 0 wo 3 40.7 1 1 1 0 0 wo 4 43.2 64 1 64 0 0 wo 5 42.8 1 1 1 0 0 wo 7 40.5 7 2 4 0 3 wo 9 38.7 1 1 1 0 0 wo 11 43.1 8 3 7 0 1 wo 12 43.9 18 1 18 0 0 wo 13 42.7 14 1 14 0 0 wo 15 42.3 19 1 19 0 0 wo 17 42.6 3 1 3 0 0 wo 18 45.2 16 1 16 0 0 wo 19 38.1 22 1 22 0 0 wo 21 38.9 1 1 1 0 0 wo 23 39.7 1 1 1 0 0 wo 24 39.5 93 2 93 0 0 wo 25 39.4 1 1 1 0 0 wo 28 37.2 1 1 1 0 0 wo 29 39.9 0 0 0 0 0 wo 30 39 2 1 2 0 0 wo 46 46.5 53 1 53 0 0 wo 47 37.6 31 1 31 0 0 wo 49 43.3 5 1 5 0 0 wo 50 44.8 3 1 3 0 0 wo 51 38.1 10 2 10 0 0 #legend: abund=insect abundance; rich = insect richness; WB=wood-boring insects;LC = leaf-chewing; SS = sap-sucking insects attach(tab) plot(log(abund)~chloro,pch=16,cex=1.2,las=1) tapply(chloro,treatment,mean) shapiro.test(chloro) shapiro.test(rich) wilcox.test(rich~treatment) Wilcoxon rank sum test with continuity correction data: rich by treatment W = 578.5, p-value = 1.07e-05 alternative hypothesis: true location shift is not equal to 0 wilcox.test(abund~treatment) Wilcoxon rank sum test with continuity correction data: abund by treatment W = 625.5, p-value = 1.055e-06 wilcox.test(chloro~treatment) Wilcoxon rank sum test with continuity correction data: chloro by treatment W = 551, p-value = 0.0003856 alternative hypothesis: true location shift is not equal to 0 ********************************************** m1=glm(log(abund+1)~chloro,quasipoisson) anova(m1,test="F") Analysis of Variance Table Response: log(abund + 1) Df Sum Sq Mean Sq F value Pr(>F) chloro 1 11.472 11.4723 5.4424 0.02327 * Residuals 56 118.044 2.1079 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 summary(m1) glm(formula = log(abund + 1) ~ chloro, family = quasipoisson()) Deviance Residuals: Min 1Q Median 3Q Max -1.6636 -0.7773 0.1709 0.5287 1.6888 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.44968 0.71186 -0.632 0.5304 chloro 0.03709 0.01625 2.283 0.0266 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for quasipoisson family taken to be 0.7485725) Null deviance: 45.270 on 52 degrees of freedom Residual deviance: 41.471 on 51 degrees of freedom AIC: NA curve(exp(-0.45+(0.037*x)),add=T,lwd=2) ********************************************************* #MDS analysys ### # Anosim ### detach(tab) tab1=read.table("clipboard",h=T) tab1 attach(tab1) treatment sample chloro abund rich wb lc ss wb1 wb2 wb3 wb4 wb5 wb6 wb7 wb8 wb9 wb10 lc1 lc2 lc3 lc4 lc5 lc6 lc7 ss1 ss2 ss3 ss4 ss5 ss6 ss7 with 2 48 19 2 19 0 0 0 0 0 0 0 0 1 0 0 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 with 3 45.5 81 2 80 1 0 0 0 0 0 0 0 0 0 0 80 0 1 0 0 0 0 0 0 0 0 0 0 0 0 with 7 46.8 32 3 31 0 1 0 1 0 0 0 0 0 0 0 30 0 0 0 0 0 0 0 0 1 0 0 0 0 0 with 8 45.6 74 1 74 0 0 0 0 0 0 0 0 0 0 0 74 0 0 0 0 0 0 0 0 0 0 0 0 0 0 with 11 40.6 26 4 23 0 3 0 1 0 0 0 0 0 0 0 22 0 0 0 0 0 0 0 0 2 0 1 0 0 0 with 12 46.7 112 2 112 0 0 0 0 0 0 0 0 1 0 0 111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 with 13 43.4 96 2 95 1 0 0 0 0 0 0 0 0 0 0 95 0 0 0 1 0 0 0 0 0 0 0 0 0 0 with 14 39 155 1 155 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 with 15 38.5 30 3 29 0 1 0 0 0 0 0 0 1 0 0 28 0 0 0 0 0 0 0 0 1 0 0 0 0 0 with 16 38.3 317 4 314 2 1 0 0 0 0 0 0 0 0 0 314 1 0 0 0 1 0 0 0 0 0 0 0 1 0 with 17 44.6 156 4 154 1 1 0 1 0 0 0 0 0 0 0 153 0 1 0 0 0 0 0 0 0 1 0 0 0 0 with 19 42.9 51 1 51 0 0 0 0 0 0 0 0 0 0 0 51 0 0 0 0 0 0 0 0 0 0 0 0 0 0 with 20 40.7 111 4 110 0 1 0 1 0 0 1 0 0 0 0 108 0 0 0 0 0 0 0 0 0 1 0 0 0 0 with 21 37.8 28 1 28 0 0 0 0 0 0 0 0 0 0 0 28 0 0 0 0 0 0 0 0 0 0 0 0 0 0 with 22 48.8 43 1 43 0 0 0 0 0 0 0 0 0 0 0 43 0 0 0 0 0 0 0 0 0 0 0 0 0 0 with 24 52.2 17 1 17 0 0 0 0 0 0 0 0 0 0 0 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 with 25 45.9 109 3 107 1 1 0 0 0 0 0 0 0 0 0 107 0 0 0 1 0 0 0 0 1 0 0 0 0 0 with 26 45.4 180 2 180 0 0 0 1 0 0 0 0 0 0 0 179 0 0 0 0 0 0 0 0 0 0 0 0 0 0 with 27 43.8 9 2 7 0 2 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 2 0 0 0 0 0 with 28 48.3 8 4 5 2 1 0 0 0 0 0 0 0 0 0 5 1 0 0 0 0 0 1 0 1 0 0 0 0 0 with 29 44.4 50 1 50 0 0 0 0 0 0 0 0 0 0 0 50 0 0 0 0 0 0 0 0 0 0 0 0 0 0 with 30 43.6 50 7 47 2 1 0 0 0 1 0 1 1 0 0 44 1 0 0 0 1 0 0 0 1 0 0 0 0 0 with 40 40.9 507 4 505 1 1 0 0 0 0 0 0 0 0 1 504 0 1 0 0 0 0 0 0 0 0 0 0 0 1 with 41 52.5 125 5 119 1 5 0 0 1 0 0 0 0 0 0 118 0 0 0 0 0 1 0 0 0 0 0 1 0 4 with 43 52.9 22 2 21 1 0 0 0 0 0 0 0 0 0 0 21 0 0 1 0 0 0 0 0 0 0 0 0 0 0 with 44 48.2 381 3 380 1 0 0 1 0 0 0 0 0 0 0 379 0 1 0 0 0 0 0 0 0 0 0 0 0 0 with 45 46.9 168 2 168 0 0 0 2 0 0 0 0 0 0 0 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wo 1 40.2 23 1 23 0 0 0 0 0 0 0 0 0 0 0 23 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wo 2 40.3 24 1 24 0 0 0 0 0 0 0 0 0 0 0 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wo 3 40.7 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wo 4 43.2 64 1 64 0 0 0 0 0 0 0 0 0 0 0 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wo 5 42.8 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wo 30 39 2 1 2 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wo 46 46.5 53 1 53 0 0 0 0 0 0 0 0 0 0 0 53 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wo 47 37.6 31 1 31 0 0 0 0 0 0 0 0 0 0 0 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wo 49 43.3 5 1 5 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wo 50 44.8 3 1 3 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wo 51 38.1 10 2 10 0 0 0 0 0 0 0 0 0 3 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 attach(tab1) library(vegan) insetos = tab1[ ,9:32] anosim(insetos,grouping=tab1$treatment,distance="bray") Call: anosim(x = insetos, grouping = tab1$treatment, distance = "bray") Dissimilarity: bray ANOSIM statistic R: 0.3361 Significance: 0.001 Permutation: free Number of permutations: 999 #Composition differ