목표
ANOVA 에 많이 사용되는 post-hoc test를 PERMANOA에도 사용해보자
library(dplyr)
library(phyloseq)
# parameter
index = "bray"
type = "group"
# import data
meta <- sample_data(phyloseq) %>% data.frame()
phyloseq # 예제 데이터
# get distance
dist <- phyloseq::distance(phyloseq, method = index)
perma <- adonis2(dist~ group, data=meta, strata=groups, permutations=999)
# post-hoc test
phoc <- with(meta, betadisper(dist, group))
TukeyHSD(phoc)
- 출처1 : https://stat.ethz.ch/pipermail/r-sig-ecology/2012-November/003364.html
- 출처2 : https://www.researchgate.net/post/How-can-I-conduct-multiple-comparisons-when-I-use-veganadonis
- 참고1 : anova https://grunwaldlab.github.io/analysis_of_microbiome_community_data_in_r/07--diversity_stats.html
반응형