adonis(vegan)
adonis()所属R语言包:vegan
Permutational Multivariate Analysis of Variance Using Distance Matrices
Permutational多元方差分析,使用距离矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Analysis of variance using distance matrices — for partitioning distance matrices among sources of variation and fitting linear models (e.g., factors, polynomial regression) to distance
使用距离矩阵方差分析 - 距离矩阵分区之间距离的变化和线性模型拟合的来源(例如,影响因素,多项式回归)
用法----------Usage----------
adonis(formula, data, permutations = 999, method = "bray",
strata = NULL, contr.unordered = "contr.sum",
contr.ordered = "contr.poly", ...)
参数----------Arguments----------
参数:formula
a typical model formula such as Y ~ A + B*C, but where Y is either a dissimilarity object (inheriting from class "dist") or data frame or a matrix; A, B, and C may be factors or continuous variables. If a dissimilarity object is supplied, no species coefficients can be calculated (see Value below).
一个典型的模型公式,如Y ~ A + B*C,但其中Y是的一个相异对象(继承类"dist")或数据框或矩阵;A,<X >和B可能是因素或连续变量。如果相异对象提供,没有任何物种系数计算(见下面的值)。
参数:data
the data frame from which A, B, and C would be drawn.
A,B和C将得出的数据框。
参数:permutations
number of replicate permutations used for the hypothesis tests (F tests).
用于假设检验(F测试)的重复排列数。
参数:method
the name of any method used in vegdist to calculate pairwise distances if the left hand side of the formula was a data frame or a matrix.
,在vegdist计算成对距离所用的任何方法的名称,如果左边的右手侧的formula是一个数据框或矩阵。
参数:strata
groups (strata) within which to constrain permutations.
群体(阶层),其中限制排列。
参数:contr.unordered, contr.ordered
contrasts used for the design matrix (default in R is dummy or treatment contrasts for unordered factors).
对比的设计矩阵(默认情况下,在R的虚拟或治疗对比无序的因素)。
参数:...
Other arguments passed to vegdist.
其他参数传递给vegdist。
Details
详细信息----------Details----------
adonis is a function for the analysis and partitioning sums of squares using semimetric and metric distance matrices. Insofar as it partitions sums of squares of a multivariate data set, it is directly analogous to MANOVA (multivariate analysis of variance). M.J. Anderson (McArdle and Anderson 2001, Anderson 2001) refers to the method as “permutational manova” (formerly “nonparametric manova”). Further, as its inputs are linear predictors, and a response matrix of an arbitrary number of columns (2 to millions), it is a robust alternative to both parametric MANOVA and to ordination methods for describing how variation is attributed to different experimental treatments or uncontrolled covariates. It is also analogous to redundancy analysis (Legendre and Anderson 1999).
adonis是一个函数的分析和分区款项使用semimetric和度量的距离矩阵平方。至于分区款项平方的多变量数据集,它是直接类似于多元方差分析(MANOVA)。 MJ·安德森(2001年麦卡德尔和安德森,安德森2001)指的是方法作为“permutational的方差分析”(原名“非参数方差分析”)。另外,作为其输入的线性预测,和一个响应矩阵的任意数目的列(2百万),它是一个强大的替代两个参数MANOVA和协调方法,用于说明如何变化归因于不同的试验性治疗或不受控制协变量。这也是类似的冗余分析(Legendre和安德森,1999年)。
Typical uses of adonis include analysis of ecological community data (samples X species matrices) or genetic data where we might have a limited number of samples of individuals and thousands or millions of columns of gene expression data (e.g. Zapala and Schork 2006).
adonis的典型应用包括分析生态社区的数据(样本X种矩阵)或基因数据,我们可能有一个有限的样本数的个人和数千或数百万的基因表达数据的列(如:2006年萨帕拉和朔尔克)。
adonis is an alternative to AMOVA (nested analysis of molecular variance, Excoffier, Smouse, and Quattro, 1992; amova in the ade4 package) for both crossed and nested factors.
adonis是另一种AMOVA(嵌套的分子变异分析,Excoffier,Smouse,和Quattro,1992; amovaade4包),交叉和嵌套的因素。
If the experimental design has nestedness, then use strata to test hypotheses. For instance, imagine we are testing the whether a plant community is influenced by nitrate amendments, and we have two replicate plots at each of two levels of nitrate (0, 10 ppm). We have replicated the experiment in three fields with (perhaps) different average productivity. In this design, we would need to specify strata = field so that randomizations occur only within each field and not across all fields . See example below.
如果实验设计的嵌套,然后使用strata来验证假设。例如,假设我们正在测试的由硝酸修订的影响是否植物群落,我们有两个重复的图在每两个级别的硝酸盐(0,10 PPM)。我们复制的实验在三个领域(也许)的平均生产力。在这个设计中,我们需要指定strata = field“这样的随机化只发生在每一个领域,而不是在所有领域。见下面的例子。
Like AMOVA (Excoffier et al. 1992), adonis relies on a long-understood phenomenon that allows one to partition sums of squared deviations from a centroid in two different ways (McArdle and Anderson 2001). The most widely recognized method, used, e.g., for ANOVA and MANOVA, is to first identify the relevant centroids and then to calculated the squared deviations from these points. For a centered n x p response matrix Y, this method uses the p x p inner product matrix Y'Y. The less appreciated method is to use the n x n outer product matrix YY'. Both AMOVA and adonis use this latter method. This allows the use of any semimetric (e.g. Bray-Curtis, aka Steinhaus, Czekanowski, and S酶rensen) or metric (e.g. Euclidean) distance matrix (McArdle and Anderson 2001). Using Euclidean distances with the second method results in the same analysis as the first method.
如AMOVA(Excoffier等,1992)中,adonis依赖于一个的术语理解的现象,允许一到两种不同的方式(麦卡德尔和安德森,2001)质心的平方差的配分函数。使用最广泛认可的方法,例如,为ANOVA,MANOVA,是先确定有关的重心,然后从这些点计算偏差的平方。一个中心n x p响应矩阵Y,此方法使用p x p内的产品矩阵Y'Y。越少,升值的方法是使用n x n外的产品矩阵YY'。 AMOVA和adonis使用后一种方法。允许使用任何semimetric(例如布雷柯蒂斯,又名斯坦豪斯,Czekanowski,和Sorensen)或公制(如欧几里德)距离矩阵(麦卡德尔和安德森,2001)。使用欧几里得距离与所述第二方法的结果,在第一种方法中相同的分析。
Significance tests are done using F-tests based on sequential sums of squares from permutations of the raw data, and not permutations of residuals. Permutations of the raw data may have better small sample characteristics. Further, the precise meaning of hypothesis tests will depend upon precisely what is permuted. The strata argument keeps groups intact for a particular hypothesis test where one does not want to permute the data among particular groups. For instance, strata = B causes permutations among levels of A but retains data within levels of B (no permutation among levels of B). See permutations for additional details on permutation tests in Vegan.
使用F测试顺序排列的原始数据,而不是排列的残差平方和的基础上进行显着性检验。排列的原始数据可能有更好的小样本特性。此外,假设检验的准确含义取决于恰恰是置换。的地层参数保持完整的一个特定的假设检验,其中一个不特定群体要重排的数据组。例如,strata = B导致置换之间水平的A,但保留数据B(没有B)之间的水平排列的水平内。见permutations排列测试,素食主义者的更多细节。
The default contrasts are different than in R in general. Specifically, they use “sum” contrasts, sometimes known as “ANOVA” contrasts. See a useful text (e.g. Crawley, 2002) for a transparent introduction to linear model contrasts. This choice of contrasts is simply a personal pedagogical preference. The particular contrasts can be set to any contrasts specified in R, including Helmert and treatment contrasts.
默认contrasts不同于一般在R。具体来说,他们使用“求和”的对比,有时也被称为“方差分析”对比。一个有用的文本(例如克劳利,2002年),一个透明的线性模型的对比介绍。选择对比的是简单的一个个人教学优先股。的特定的对比,可以被设置为任何contrasts在R指定,包括赫尔默特和治疗对比。
Rules associated with formulae apply. See "An Introduction to R" for an overview of rules.
与公式的规则适用。请参阅概论“R”表示的概述的规则。
print.adonis shows the aov.tab component of the output.
print.adonis显示aov.tab分量输出。
值----------Value----------
This function returns typical, but limited, output for analysis of variance (general linear models).
这个函数返回的典型,但有限的产量进行方差分析(广义线性模型)。
参数:aov.tab
Typical AOV table showing sources of variation, degrees of freedom, sequential sums of squares, mean squares, F statistics, partial R-squared and P values, based on N permutations.
典型的的AOV表的变化,自由度来源,连续的平方和,均方,F统计,偏R-平方和P值,根据N排列。
参数:coefficients
matrix of coefficients of the linear model, with rows representing sources of variation and columns representing species; each column represents a fit of a species abundance to the linear model. These are what you get when you fit one species to your predictors. These are NOT available if you supply the distance matrix in the formula, rather than the site x species matrix
系数矩阵的线性模型,行,分别代表代表物种来源的变化和列,每一列代表一个适合的物种丰富度的线性模型。这是什么时候,你得到适合您的预测一个物种。这些是不设,如果你提供的距离矩阵式中,而不是这个网站所种矩阵
参数:coef.sites
matrix of coefficients of the linear model, with rows representing sources of variation and columns representing sites; each column represents a fit of a sites distances (from all other sites) to the linear model.These are what you get when you fit distances of one site to your predictors.
是什么时候,你得到一个适合的距离,行,分别代表来源的变化和列代表网站的线性模型的系数矩阵,每一列代表一个适合的地点的距离(从所有其他站点,)的线性model.These,网站,您的预测。
参数:f.perms
an N by m matrix of the null F statistics for each source of variation based on N permutations of the data.
Nm空FN的数据的排列的变化的基础上为每个源的统计信息的矩阵。
参数:model.matrix
The model.matrix for the right hand side of the formula.
model.matrix为下式的右手侧。
参数:terms
The terms component of the model.
terms组件的模型。
注意----------Note----------
Anderson (2001, Fig. 4) warns that the method may confound location and dispersion effects: significant differences may be caused by different within-group variation (dispersion) instead of different mean values of the groups (see Warton et al. 2012 for a general analysis). However, it seems that adonis is less sensitive to dispersion effects than some of its alternatives (link{anosim}, mrpp). Function betadisper is a sister function to adonis to study the differences in dispersion within the same geometric framework.
安德森(2001,图4),警告,该方法可能混淆位置和分散效果:重大差异可能是由不同的组内变化(分散),而不是不同的基团的平均值(见沃顿等。2012为一般分析)。然而,似乎adonis是不敏感的色散效应及其替代品(link{anosim},mrpp)。的函数betadisper是妹妹功能adonis研究的差异,在相同的几何结构分散。
(作者)----------Author(s)----------
Martin Henry H. Stevens
<a href="mailto:HStevens@muohio.edu">HStevens@muohio.edu</a>,
adapted to <span class="pkg">vegan</span> by Jari Oksanen.
参考文献----------References----------
analysis of variance. Austral Ecology, <STRONG>26</STRONG>: 32–46.
Analysis Using S-PLUS
molecular variance inferred from metric distances among DNA haplotypes: Application to human mitochondrial DNA restriction data. Genetics, <STRONG>131</STRONG>:479–491.
analysis: Testing multispecies responses in multifactorial ecological experiments. Ecological Monographs, <STRONG>69</STRONG>:1–24.
community data: A comment on distance-based redundancy analysis. Ecology, <STRONG>82</STRONG>: 290–297.
analyses confound location and dispersion effects. Methods in Ecology and Evolution, 3, 89–101.
distance matrices for testing associations between gene expression patterns and related variables. Proceedings of the National Academy of Sciences, USA, <STRONG>103</STRONG>:19430–19435.
参见----------See Also----------
mrpp, anosim,
mrpp,anosim,
实例----------Examples----------
data(dune)
data(dune.env)
adonis(dune ~ Management*A1, data=dune.env, permutations=99)
### Example of use with strata, for nested (e.g., block) designs.[##示例使用与地层,嵌套(例如,块)设计。]
dat <- expand.grid(rep=gl(2,1), NO3=factor(c(0,10)),field=gl(3,1) )
dat
Agropyron <- with(dat, as.numeric(field) + as.numeric(NO3)+2) +rnorm(12)/2
Schizachyrium <- with(dat, as.numeric(field) - as.numeric(NO3)+2) +rnorm(12)/2
total <- Agropyron + Schizachyrium
library(lattice)
dotplot(total ~ NO3, dat, jitter.x=TRUE, groups=field,
type=c('p','a'), xlab="NO3", auto.key=list(columns=3, lines=TRUE) )
Y <- data.frame(Agropyron, Schizachyrium)
mod <- metaMDS(Y)
plot(mod)
### Hulls show treatment[##船体显示治疗]
ordihull(mod, group=dat$NO3, show="0")
ordihull(mod, group=dat$NO3, show="10", col=3)
### Spider shows fields[##蜘蛛显示领域]
ordispider(mod, group=dat$field, lty=3, col="red")
### Correct hypothesis test (with strata)[##正确的假设检验(与地层)]
adonis(Y ~ NO3, data=dat, strata=dat$field, perm=1e3)
### Incorrect (no strata)[##不正确(无阶层)]
adonis(Y ~ NO3, data=dat, perm=1e3)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|