R/R_Usage [Eng.]

ANOSIM, Statistical analysis with Rstudio

Cha-Nyong 2022. 11. 7. 20:20

Hello,

 

There are several method of statistical analysis between groups such as ANOSIM, ANOVA, PERMANOSIM PERMANOVA.

This Posting is about Analysis of Similiarity (ANOSIM).

 

The interpretation of ANOSIM is well explained below of Google WIKIPedia.

 

https://en.wikipedia.org/wiki/Analysis_of_similarities

 

Theory, equation, interpretation, etc.

 

 

Here is about how to statistically analysis the data by R program command lines

 

Packages are used with "vegan".

 

 

 

 

1. Install packages

 

################### Install Packages #######################

 

install.packages("vegan")

 

########################################################

 

 

 

2. Input dataframe # watch attached file to figure out data format.

 

##################### Load Dataframe ######################

 

pc = read.csv("F:/SRA/ANOSIM/Canine_Feline_ANOSIM_test.csv", header= TRUE)

 

#########################################################

 

 

 

3. Data analysis and pretreatment

 

##################### Processing ##########################

 

com = pc[,3:ncol(pc)]

m_com = as.matrix(com)

 

ano = anosim(m_com, pc$Host, distance = "bray", permutations = 9999)

 

##########################################################

 

 

 

4. Check the results

 

####################### Result #############################

 

ano

 

##########################################################

 

 

R command Running example

 

> 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 interpretation

 

0.75 < R < 1 - highly different
0.5 < R < 0.75 -  different
0.25 < R < 0.5 -  different with some overlap
0.1 < R < 0.25 - similar with some differences (or high overlap)
R < 0.1 - similar

 

 

Result: 

Significance is p-value. The value is 0.0001, so statistically significance, and R value indicate somehow similiar with some differences.

 

 

 

Analysis..... It looks like professional, but nothing if you understand it.