안녕하세요,
Group간의 수치 차이를 통계 분석에는 대표적으로 ANOSIM, ANOVA, PERANOSIM, PERANOVA 등등이 있습니다.
이 번 포스팅에서는 Analysis of Similiarity (ANOSIM)에 대해 다뤄볼게요.
아래 Google WIKIPedia에 가면 설명은 너무 잘 되어있습니다.
https://en.wikipedia.org/wiki/Analysis_of_similarities
ANOSIM의 원리, 공식, 정의, 결과 값 해석이 기술되어 있습니다.
저는 R program에서 어떤 명령어를 사용하여 분석하는지 설명합니다.
패키지는 "vegan"을 이용합니다.
1. 패키지 설치
################### Install Packages #######################
install.packages("vegan")
########################################################
2. 데이터 불러오기 --> 첨부 파일에 데이터 포맷 참고하셔도 됩니다 :)
##################### Load Dataframe ######################
pc = read.csv("F:/SRA/ANOSIM/Canine_Feline_ANOSIM_test.csv", header= TRUE)
#########################################################
3. 데이터 전 처리 및 분석
##################### Processing ##########################
com = pc[,3:ncol(pc)]
m_com = as.matrix(com)
ano = anosim(m_com, pc$Host, distance = "bray", permutations = 9999)
##########################################################
4. 결과 값 확인
####################### Result #############################
ano
##########################################################
R command Running 예시
> library(vegan)
> pc = read.csv("F:/SRA/ANOSIM/Canine_Feline_ANOSIM_test.csv", header= TRUE)
> #make community matrix - extract columns with abundance information, turn data frame into matrix
> com = pc[,3:ncol(pc)]
> m_com = as.matrix(com)
> ano = anosim(m_com, pc$Host, distance = "bray", permutations = 9999)
> ano
Call:
anosim(x = m_com, grouping = pc$Host, permutations = 9999, distance = "bray")
Dissimilarity: bray
ANOSIM statistic R: 0.15
Significance: 1e-04
Permutation: free
Number of permutations: 9999
ANOSIM R value 해석 Simply
해석:
Significance가 p-value이다. 0.0001이므로 통계적으로 유의하며, R 값이 어느 정도는 비슷하나, 0에 가깝기 때문에 또 비슷하다고 할 수 있다.
분석. 명령어를 이용한다는 것은 전문적으로 보이지만, 실제로 알고 보면.. 별 거 없다.
'R > R_Usage [KOR.]' 카테고리의 다른 글
R을 이용한 Heatmap 시각화 (0) | 2022.11.08 |
---|---|
Rstudio의 working directory 디폴트 설정 (0) | 2022.11.07 |
R 언어 header 의미와 column 이름 지정 (0) | 2022.11.03 |
R을 활용한 미생물 군집 3D plot (mds, pcoa) (0) | 2022.11.02 |
R을 이용한 업무자동화 (1) | 2022.11.02 |