Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand Adonis Analysis in R language

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

It is believed that many inexperienced people have no idea about how to understand the Adonis analysis in R language. therefore, this paper summarizes the causes and solutions of the problem. I hope you can solve this problem through this article.

Usually, when we do the hypothesis test, we look at the influence of a grouped variable (that is, a factor variable) on a numerical variable. At this time, we can choose the appropriate test method according to the data characteristics, as follows:

This statistical test is to analyze the differences of different grouping data, which can come from the block design of the experiment itself or from cluster analysis. When the situation becomes more complex-different groups are no longer individual data variables, but data matrices, such as microbial community data, we need more complex methods to analyze, that is, the main content of inter-group difference analysis.

One of the disadvantages of Anosim analysis and Anosim analysis is that it can only analyze the influence of one grouping factor, and the wrong result may be obtained when there are two factors at the same time. Today, we will introduce another nonparametric difference analysis Adonis. ADONIS, also known as permutation multivariate analysis of variance (permutational MANOVA, that is, PERMANOVA) or nonparametric multivariate analysis of variance (nonparametric MANOVA), is a nonparametric multivariate analysis of variance based on sample distance (default is distance= "bray", you can choose other distances, or you can directly use distance matrix for analysis). It is the equivalent form of MANOVA. This method can analyze the explanation degree of sample distance by different grouping factors. The variance of inter-group distance is SSb and the variance of intra-group distance is SSw. If the data is significantly affected by grouping, then SSb should be much less than SSw, so construct statistics F:

Where n is the total number of samples and m is the number of groups. If the difference between groups is not significant, that is, all the samples in each group are from the same population, then F ≈ 1; if the difference between groups is significant, F > > 1. Different from the MANOVA of analysis of variance, Adonis uses permutation to obtain the distribution of statistic F instead of using standard F distribution to judge, so it is a non-parametric method. Adonis analysis in R can use the adonis () and adonis2 () functions in the vegan package. Examples are as follows: # read species and environmental factor information data=read.csv ("otu_table.csv", header=TRUE, row.names=1) envir=read.table ("environment.txt", header=TRUE) rownames (envir) = envir [, 1] env=envir [,-1] # screen high abundance species and standardize species data means=apply (data, 1, mean) otu=data [names (Means [means > 10]),] otu=t (otu) # clustering kms=kmeans (env, centers=3) based on geographical distance Nstart=22) Position=factor (kms$cluster) # Adonis analysis library (vegan) adonis=adonis (otu~Position, permutations=999) adonis

It can be seen that the test results are also significant, and the R2 of each part is given in the results.

Unlike Anosim and MRPP, Adonis is much more robust and can deal with both factor variables and continuous numerical variables (essentially regression). Because Adonis is permutation multivariate ANOVA, the formula of ANOVA can be used flexibly, so the analysis effect is greatly enhanced. Here we analyze the influence of latitude and longitude alone, using the formula of multivariate two-factor analysis of variance: adonis2=adonis (otu~Latitude*Longitude, env, permutations=999) adonis2

It can be seen that longitude, latitude and their interaction have significant effects on the microbial community. After reading the above, have you mastered how to understand Adonis analysis in R language? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report