我试图在素食主义者中使用嵌套的PERMANOVA,但是在F统计量和主要影响的p值方面,我得到的结果与biobiR和PRIMER-7的结果不同。任何帮助将不胜感激。
素食和生物多样性保护的结果:library(vegan)
library(BiodiversityR)
# Make metadata
metadata <- cbind.data.frame(SampleID = seq(from = 1, to = 18, by = 1),
Diet = rep(c("Ref", "Soy"), each = 9),
Tank = rep(c("T1", "T2", "T3", "T4", "T5", "T6"), each = 3))
# Make abundance table
set.seed(1910)
low <- data.frame(replicate(100,sample(0:10, 9, rep = TRUE)))
colnames(low) <- c(1:100)
set.seed(1910)
high1 <- data.frame(replicate(90,sample(0:10, 9, rep = TRUE)))
set.seed(1910)
high2 <- data.frame(replicate(10,sample(10:30, 9, rep = TRUE)))
high <- cbind(high1, high2)
colnames(high) <- c(1:100)
table <- rbind(low, high)
# Calculate distance metrix
dist_bray <- vegdist(table, method = "bray")
### Nested PERMANOVA in vegan ###
# Define permutation scheme
perm <- how(complete = TRUE,
within = Within(type = "none"),
plots = with(metadata, Plots(strata = Tank, type = "free")))
# Nested PERMANOVA
adonis2(dist_bray ~ Diet + Tank, data = metadata, permutations = perm)
#> Set of permutations < 'minperm'. Generating entire set.
#> Permutation test for adonis under reduced model
#> Terms added sequentially (first to last)
#> Plots: Tank, plot permutation: free
#> Permutation: none
#> Number of permutations: 719
#>
#> adonis2(formula = dist_bray ~ Diet + Tank, data = metadata, permutations = perm)
#> Df SumOfSqs R2 F Pr(>F)
#> Diet 1 0.22595 0.20758 4.1298 0.1
#> Tank 4 0.20602 0.18927 0.9414 1.0
#> Residual 12 0.65653 0.60315
#> Total 17 1.08850 1.00000
### Nested PERMANOVA in biodiversityR ###
nested.npmanova(dist_bray ~ Diet + Tank, data = metadata, permutations = 999)
#> Total sum of squares of distance matrix: 1.088504
#> Total sum of squares for non-parametric manova: 1.08850350474611
#>
#> Nested anova for Tank nested within Diet
#>
#> Df SumsofSquares F N.Perm Pr(>F)
#> Diet 1 0.22595 4.3868 999 0.098 .
#> Tank 4 0.20602 0.9414 999 0.675
#> Residuals 12 0.65653 0.0547
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
由reprex package(v0.2.1)于2019-05-16创建
PRIMER-7的结果: nested PERMANOVA in PRIMER-7
由于随机效应项的变异分量为负,因此将随机效应与主要效应合并起来进行变异划分。以下是带有术语池的嵌套PERMANOVA: nested PERMANOVA with term pooling in PRIMER-7