素食主义者中的adonis:变量的顺序或阶层的使用

时间:2015-12-28 23:48:29

标签: r vegan

我在素食主义者中使用adonis功能来确定1)如果多个位点的共同宿主物种的微生物群落不同,2)如果站点不同。我已经检查了CV和SO上的所有帖子,并且没有明确的答案如何使用adonis函数确定多个因素的重要性。

我是第一次这样做的,正如Vegan adonis unbalanced design SS type II or III所建议的那样:

## where jacc is a dissimilarity matrix using the jaccard metric
adonis <- adonis(jacc ~ Species + Site, data = df_compare)

# Call:
# adonis(formula = jacc ~ Species + Site, data = df_compare) 
# 
# Permutation: free
# Number of permutations: 999
# 
# Terms added sequentially (first to last)
# 
#           Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)    
# Species    2    0.6055 0.30273  1.7690 0.04981  0.004 ** 
# Site       4    2.1378 0.53445  3.1231 0.17587  0.001 ***
# Residuals 55    9.4122 0.17113         0.77432           
# Total     61   12.1554                 1.00000           
# ---
# Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

然后颠倒顺序

adonis_2 <- adonis(jacc ~ Site + Species, data = df_compare)

# Call:
# adonis(formula = jacc ~ Site + Species, data = df_compare) 
# 
# Permutation: free
# Number of permutations: 999
# 
# Terms added sequentially (first to last)
# 
#           Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)    
# Site       4    2.4385 0.60962  3.5623 0.20061  0.001 ***
# Species    2    0.3048 0.15238  0.8904 0.02507  0.716    
# Residuals 55    9.4122 0.17113         0.77432           
# Total     61   12.1554                 1.00000           
# ---
# Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

但我不知道如何解释,因为顺序很重要,我不确定物种之间是否存在差异

经过一番搜索,我决定使用分层。

我认为这是说:当你只比较同一地点的物种时,共生物种是不同的。

species_adonis <- adonis(jacc ~ Species, strata = df_compare$Site, data = df_compare)

# Call:
# adonis(formula = jacc ~ Species, data = df_compare, strata = df_compare$Site) 
# 
# Blocks:  strata 
# Permutation: free
# Number of permutations: 999
# 
# Terms added sequentially (first to last)
# 
#           Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)
# Species    2    0.6055 0.30273  1.5464 0.04981  0.335
# Residuals 59   11.5500 0.19576         0.95019       
# Total     61   12.1554                 1.00000  

然后问关于网站的问题,我在阻塞中使用了物种

我认为这是说:当你只比较相同的物种时,网站是不同的

site_adonis <- adonis(jacc ~ Site, strata = df_compare$Species, data = df_compare)

# Call:
# adonis(formula = jacc ~ Site, data = df_compare, strata = df_compare$Species) 
# 
# Blocks:  strata 
# Permutation: free
# Number of permutations: 999
# 
# Terms added sequentially (first to last)
# 
#           Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)    
# Site       4    2.4385 0.60962  3.5761 0.20061  0.001 ***
# Residuals 57    9.7169 0.17047         0.79939           
# Total     61   12.1554                 1.00000           
# ---
# Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

我的结论是,特定物种的微生物群落在不同地点之间存在差异,但微生物群落在宿主物种中没有差异。

我的方法是正确的还是我误解了阶层的使用(即阻塞)?

当我切换变量的顺序时,有没有办法以某种方式平均两个测试中的p值?

0 个答案:

没有答案