画一个带统计检验的PcOA分析结果 (再进一步,配对比较)

前期回顾

方差分析基本概念:方差分析中的“元”和“因素”是什么?

PERMANOVA原理解释:这个统计检验可用于判断PCA/PCoA等的分群效果是否显著!

实战1:画一个带统计检验的PCoA分析结果

在检验完某个因素对物种组成有显著影响后,如果关注该因素不同水平对物种的构成是否存在显著影响,就需要逐一对每两对水平进行检验了。

配对Adonis确定不同管理方式两两之间对物种组成差异的影响

adonis分析可以检验某个因素整体对物种组成差异的影响,但不能比较这个因素的多个水平之间两两是否差异显著,如Management中的BFHM两种方式是否对物种组成差异有显著影响?

这时就需要pairwise.adonis来进行配对检验了。

# devtools::install_github("pmartinezarbizu/pairwiseAdonis/pairwiseAdonis")
library(pairwiseAdonis)

# This is a wrapper function for multilevel pairwise comparison 
# using adonis() from package 'vegan'. 
# The function returns adjusted p-values using p.adjust().
dune.pairwise.adonis <- pairwise.adonis(x=dune, factors=dune.env$Management, sim.function = "vegdist",
  sim.method = "bray",
  p.adjust.m = "BH",
  reduce = NULL,
  perm = 999)

dune.pairwise.adonis

##      pairs Df SumsOfSqs  F.Model        R2 p.value p.adjusted sig
## 1 SF vs BF  1 0.4016624 2.514890 0.2643110   0.055     0.0825    
## 2 SF vs HF  1 0.2828804 1.857489 0.1710790   0.117     0.1404    
## 3 SF vs NM  1 0.7575728 3.425694 0.2551595   0.008     0.0480   .
## 4 BF vs HF  1 0.1617135 1.567531 0.2071390   0.197     0.1970    
## 5 BF vs NM  1 0.5662456 2.715242 0.2794827   0.017     0.0510    
## 6 HF vs NM  1 0.6513088 3.423068 0.2755413   0.031     0.0620

拼一起画个图

library(ggpubr)
library(patchwork)
tab2 <- ggtexttable(dune.pairwise.adonis[,c("pairs","R2","p.value","p.adjusted")], rows = NULL, 
                    theme = ttheme("blank")) %>% 
  tab_add_hline(at.row = 1:2, row.side = "top", linewidth = 1)  %>% 
  tab_add_hline(at.row = nrow(dune.pairwise.adonis)+1, row.side = "bottom", linewidth = 1)  

p2 = p + tab2 
p2

b5f16a3320b62edc1be445af1d1f2d77.png

p2 + plot_layout(design=c(area(1,1), area(2,1)))
# p / tab2
# 调布局

b3651967a9dcea827f95fc6c2aee3e51.png

ANOSIMPERMANOVA的pairwise analysis声明:“Pairwise tests are not possible in vegan. My understanding is that the non-R software with such tests makes separate pairwise tests using subsets of data with only two levels of a factor in one test. We don’t provide that in vegan and have no plans to provide this in the future.”  (cited by Jari Oksanen, author of anosim and Adonis{vegan} in R)https://stat.ethz.ch/pipermail/r-sig-ecology/2013-June/003865.html

参考

  1. https://www.scribbr.com/frequently-asked-questions/one-way-vs-two-way-anova/

  2. MANOVA的前提假设 https://www.real-statistics.com/multivariate-statistics/multivariate-analysis-of-variance-manova/manova-assumptions/  https://www.statology.org/manova-assumptions/

  3. https://statistics.laerd.com/statistical-guides/one-way-anova-statistical-guide.php

  4. https://chrischizinski.github.io/rstats/vegan-ggplot2/

  5. https://chrischizinski.github.io/rstats/adonis/

  6. https://chrischizinski.github.io/rstats/ordisurf/

  7. https://www.rdocumentation.org/packages/vegan/versions/1.11-0/topics/adonis

  8. https://stats.stackexchange.com/questions/312302/adonis-in-vegan-order-of-variables-non-nested-with-one-degree-of-freedom-for

  9. https://stats.stackexchange.com/questions/188519/adonis-in-vegan-order-of-variables-or-use-of-strata?noredirect=1

  10. https://github.com/vegandevs/vegan/issues/229

  11. https://stats.stackexchange.com/questions/476256/adonis-vs-adonis2

  12. 清晰解释Type I, Type II, Type III https://mcfromnz.wordpress.com/2011/03/02/anova-type-iiiiii-ss-explained/

  13. 清晰解释Type I, Type II, Type III https://stats.stackexchange.com/questions/60362/choice-between-type-i-type-ii-or-type-iii-anova

  14. https://thebiobucket.blogspot.com/2011/08/two-way-permanova-adonis-with-custom.html#more

  15. adonis的前提条件 https://thebiobucket.blogspot.com/2011/04/assumptions-for-permanova-with-adonis.html#more

  16. 作者的论文 https://static1.squarespace.com/static/580e3c475016e191c523a0e2/t/5813ba8b5016e1a5b61f454a/1477687949842/Anderson_et_al-2013-ANOSIM+vs.+PERMANOVA.pdf

往期精品(点击图片直达文字对应教程)

63c93321eda82b8645f0b2208227cc12.png

1e4b4407cead6275474bb1cd4f425ea2.png

005beef600d47b952381ac79277de09f.png

3ea0d7224dae897fc9e817034b7cc0ea.png

142ca3d23d9087afe2dba90f6a7f99af.png

de8769cf5497a459afd25cec6b6b157f.png

8ac62d1ff032eec6859690a5de32c3de.png

65756e91537ef9d2504d7825d609b257.png

75b7012259ebb5ba85b523759f9daa85.png

8715e0f71dc303ef60b91609fe3b1acb.png

1fff2a482bdc88c9f4b2a22180dd4a0d.png

23fff2e64b8c9a9e609c2b434634bacd.png

8151b0bf5b7e7e7545b2eca6749f026c.png

e8d32fd6369fdb62480c3db2375b395d.png

ec7972adc1504c0ad98840eccde90026.png

70949de865e44ebef76164fa69af2284.png

2ec3c4b9f44d5e295abc2a23e98ea80a.png

1e5d79c364ef1aac4c3557a35c3d1284.png

abe60486812e6c44988651b739118898.png

a70b5a645c59707fa435be48e812dd48.png

b71f095e2c63e302d273df8254697155.png

0255703fc1be008ed6b2c6325df2820d.png

c646ad0b97c5e87db5c7cb43019b8cc8.png

5425889598380cb0b94e2fcbea3110ea.png

a44ff069f52a08b76936cc62f70e3371.png

bafe013a985ca33d74f7e254dcb88a7f.png

03fde04fda065787e85cccb81ea977e2.png

33d11af023b9b01c768dc47cf7cd191c.png

机器学习

后台回复“生信宝典福利第一波”或点击阅读原文获取教程合集

55df848ac69aa8516d668fc7a1b76670.png

356194f9ac4c101fd70a0ee80996c1c7.png

928f2cc3479cbdc71836e3888c3d79e1.png

  • 1
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

生信宝典

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值