metaMDS(vegan)
metaMDS()所属R语言包:vegan
Nonmetric Multidimensional Scaling with Stable Solution from
非度量多维标度与稳定的解决方案
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Function metaMDS performs Nonmetric Multidimensional Scaling (NMDS), and tries to find a stable solution using several random starts. In addition, it standardizes the scaling in the result, so that the configurations are easier to interpret, and adds species scores to the site ordination. The metaMDS function does not provide actual NMDS, but it calls another function for the purpose. Currently monoMDS is the default choice, and it is also possible to call the
函数metaMDS进行非度量多维标度(NMDS),并试图找到一个稳定的解决方案,使用一些随机的启动。另外,标准化的缩放在结果中,使配置更容易解释,并添加到该网站的协调的物种分数。 metaMDS功能不提供实际的NMDS,但它调用另一个功能为目的。目前monoMDS是默认选择,也可以打检测给
用法----------Usage----------
metaMDS(comm, distance = "bray", k = 2, trymax = 20,
engine = c("monoMDS", "isoMDS"), autotransform =TRUE,
noshare = (engine == "isoMDS"), wascores = TRUE, expand = TRUE,
trace = 1, plot = FALSE, previous.best, ...)
## S3 method for class 'metaMDS'
plot(x, display = c("sites", "species"), choices = c(1, 2),
type = "p", shrink = FALSE, ...)
## S3 method for class 'metaMDS'
points(x, display = c("sites", "species"),
choices = c(1,2), shrink = FALSE, select, ...)
## S3 method for class 'metaMDS'
text(x, display = c("sites", "species"), labels,
choices = c(1,2), shrink = FALSE, select, ...)
## S3 method for class 'metaMDS'
scores(x, display = c("sites", "species"), shrink = FALSE,
choices, ...)
metaMDSdist(comm, distance = "bray", autotransform = TRUE,
noshare = TRUE, trace = 1, commname, zerodist = "ignore",
distfun = vegdist, ...)
metaMDSiter(dist, k = 2, trymax = 20, trace = 1, plot = FALSE,
previous.best, engine = "monoMDS", ...)
initMDS(x, k=2)
postMDS(X, dist, pc=TRUE, center=TRUE, halfchange, threshold=0.8,
nthreshold=10, plot=FALSE, ...)
metaMDSredist(object, ...)
参数----------Arguments----------
参数:comm
Community data. Alternatively, dissimilarities either as a dist structure or as a symmetric square matrix. In the latter case all other stages are skipped except random starts and centring and pc rotation of axes.
社区数据。另外,相异无论是作为一个dist结构或作为一个对称的正方形矩阵。在后者的情况下,被跳过所有其他阶段,除了随机启动和旋转轴的定心和pc。
参数:distance
Dissimilarity index used in vegdist.
相异指数vegdist。
参数:k
Number of dimensions. NB., the number of points n should be n > 2*k + 1, and preferably higher in non-metric MDS.
的维数。注意,点的数量n应该是n > 2*k + 1,并优选高于非十进制MDS。
参数:trymax
Maximum number of random starts in search of stable solution.
搜索随机启动的最大数量的稳定的解决方案。
参数:engine
The function used for MDS. The default is to use the monoMDS function in vegan, but for backward compatibility it is also possible to use isoMDS of MASS.
用于MDS的功能。默认情况下是使用在monoMDSvegan功能,但为了向后兼容,也可以使用isoMDSMASS。
参数:autotransform
Use simple heuristics for possible data transformation of typical community data (see below). If you do not have community data, you should probably set autotransform = FALSE.
使用简单的启发式可能典型的社区数据的数据转换(见下文)。如果没有社区的数据,你应该设置autotransform = FALSE。
参数:noshare
Triggering of calculation step-across or extended dissimilarities with function stepacross. The argument can be logical or a numerical value greater than zero and less than one. If TRUE, extended dissimilarities are used always when there are no shared species between some sites, if FALSE, they are never used. If noshare is a numerical value, stepacross is used when the proportion of site pairs with no shared species exceeds noshare. The number of pairs with no shared species is found with no.shared function, and noshare has no effect if input data were dissimilarities instead of community data.
触发的计算步骤,跨越或扩展的异同与功能stepacross。这个参数可以是逻辑或大于零且小于1的数值。如果TRUE,扩展异同时,总是有一些网站没有共享的物种之间,如果FALSE,他们从来没有使用过。如果noshare是一个数值,stepacross使用时没有共享网站对种的比例超过noshare。没有共享的物种被发现与no.shared函数的对数,和noshare有没有效果,如果输入数据的不同点,而不是社会的数据。
参数:wascores
Calculate species scores using function wascores.
计算种使用功能wascores得分。
参数:expand
Expand weighted averages of species in wascores.
展开“加权平均数”的物种wascores。
参数:trace
Trace the function; trace = 2 or higher will be more voluminous.
跟踪功能; trace = 2或更高,将是更大量的。
参数:plot
Graphical tracing: plot interim results. You may want to set par(ask = TRUE) with this option.
图形追踪:图中期业绩。您可能要设置par(ask = TRUE)使用此选项。
参数:previous.best
Start searches from a previous solution.
开始搜索从以前的解决方案。
参数:x
metaMDS result (or a dissimilarity structure for initMDS.
metaMDS结果(或相异结构initMDS。
参数:choices
Axes shown.
轴所示。
参数:type
Plot type: "p" for points, "t" for text, and "n" for axes only.
图类型:"p"分"t"文字,和"n"只轴。
参数:display
Display "sites" or "species".
显示"sites"或"species"。
参数:shrink
Shrink back species scores if they were expanded originally.
缩了回去种的分数,如果他们原先扩大。
参数:labels
Optional test to be used instead of row names.
可选测试,以被用来代替行名。
参数:select
Items to be displayed. This can either be a logical vector which is TRUE for displayed items or a vector of indices of displayed items.
要被显示的资料。这可以是一个逻辑向量TRUE显示的项目或显示项目的矢量的索引。
参数:X
Configuration from multidimensional scaling.
从多维尺度的配置。
参数:commname
The name of comm: should not be given if the function is called directly.
如果直接被调用的函数的名称comm:不应该。
参数:zerodist
Handling of zero dissimilarities: either "fail" or "add" a small positive value, or "ignore". monoMDS accepts zero dissimilarities and the default is zerodist = "ignore", but with isoMDS you may need to set zerodist = "add".
处理零相异的是"fail"或"add"一个小的正价值,或"ignore"。 monoMDS接受零相异的,默认是zerodist = "ignore",但,用isoMDS,“你可能需要设置zerodist = "add"。
参数:distfun
Dissimilarity function. Any function returning a dist object and accepting argument method can be used (but some extra arguments may cause name conflicts).
相异的功能。的任何函数返回一个dist对象,并接受参数method可以使用(但可能会导致一些额外的参数名称冲突)。
参数:dist
Dissimilarity matrix used in multidimensional scaling.
在多维标度的相异矩阵。
参数:pc
Rotate to principal components.
旋转主要组成部分。
参数:center
Centre the configuration.
中心的配置。
参数:halfchange
Scale axes to half-change units. This defaults TRUE when dissimilarities were evaluated within metaMDS and the dissimilarity index has an upper limit of 1. If FALSE, the ordination dissimilarities are scaled to the same range as the input dissimilarities.
缩放轴到一半变更单位。此默认TRUE异同进行了评估在metaMDS和相异指数有上限的1。如果FALSE,统筹异同缩放到相同的范围作为输入的异同。
参数:threshold
Largest dissimilarity used in half-change scaling.
使用最大的相异半变化缩放。
参数:nthreshold
Minimum number of points in half-change scaling.
最低点半的变化缩放。
参数:object
A result object from metaMDS.
一个结果对象从metaMDS。
参数:...
Other parameters passed to functions. Function metaMDS passes all arguments to its component functions metaMDSdist, metaMDSiter, postMDS, and to distfun and engine. </table>
其他参数传递给函数。功能metaMDS所有参数传递到组件的功能metaMDSdist,metaMDSiter,postMDS,和distfun和engine。 </ TABLE>
Details
详细信息----------Details----------
Non-metric Multidimensional Scaling (NMDS) is commonly regarded as the most robust unconstrained ordination method in community ecology (Minchin 1987). Function metaMDS is a wrapper function that calls several other functions to combine Minchin's (1987) recommendations into one command. The complete steps in metaMDS are:
非度量多维标度(NMDS)通常被认为是最强大的无约束的社会生态的协调方法(明钦1987)。函数metaMDS是一个包装函数,调用其他几项功能明钦(1987年)的建议合并到一个命令。 metaMDS的完整步骤是:
Transformation: If the data values are larger than common abundance class scales, the function performs a Wisconsin double standardization (wisconsin). If the values look very large, the function also performs sqrt transformation. Both of these standardizations are generally found to improve the results. However, the limits are completely arbitrary (at present, data maximum 50 triggers sqrt and >9 triggers wisconsin). If you want to have a full control of the analysis, you should set autotransform = FALSE and standardize and transform data independently. The autotransform is intended for community data, and for other data types, you should set autotransform = FALSE. This step is perfomed using metaMDSdist.
转型:如果数据值大于普通的丰富的类尺度,功能进行一个的威斯康辛双的标准化(wisconsin)。如果值看起来非常大,功能也执行sqrt转型。这些标准化的普遍提高的结果。然而,完全是任意的限制(目前,最大的50触发sqrt和>9触发wisconsin)。如果你想有一个完整的控制分析,你应该设置autotransform = FALSE和规范独立和转换数据。的目的是autotransform社区数据和其他数据类型,你应该设置autotransform = FALSE。这是使用metaMDSdistperfomed的步骤。
Choice of dissimilarity: For a good result, you should use dissimilarity indices that have a good rank order relation to ordering sites along gradients (Faith et al. 1987). The default is Bray-Curtis dissimilarity, because it often is the test winner. However, any other dissimilarity index in vegdist can be used. Function rankindex can be used for finding the test winner for you data and gradients. The default choice may be bad if you analyse other than community data, and you should probably select an appropriate index using argument distance. This step is performed using metaMDSdist.
相异的选择:对于一个好的结果,你应该使用的相异指数有一个良好的排名顺序关系,以沿梯度订购网站(信仰等,1987年)。默认情况下是布雷柯蒂斯不同,因为它往往是测试优胜者。然而,任何其它的相异度指数在vegdist可以使用。功能rankindex可以用来寻找你的数据和梯度的测试优胜者。默认的选择可能是坏的,如果你比社区数据分析,你应该选择一个合适的索引,使用参数distance。此步骤进行使用metaMDSdist。
Step-across dissimilarities: Ordination may be very difficult if a large proportion of sites have no shared species. In this case, the results may be improved with stepacross dissimilarities, or flexible shortest paths among all sites. The default NMDS engine is monoMDS which is able to break tied values at the maximum dissimilarity, and this often is sufficient to handle cases with no shared species, and therefore the default is not to use stepacross with monoMDS. Function isoMDS does not handle tied values adequately, and therefore the default is to use stepacross always when there are sites with no shared species with engine = "isoMDS". The stepacross is triggered by option noshare. If you do not like manipulation of original distances, you should set noshare = FALSE. This step is skipped if input data were dissimilarities instead of community data. This step is performed using metaMDSdist.
跨不同点:排序可能是非常困难,如果大部分网站没有共享的物种。在这种情况下,结果可能会改善,stepacross相异,或灵活的所有站点之间的最短路径的。默认的的NMDSengine是monoMDS这是能,打破束缚值的最大差异性,这往往是足以应付情况下,没有共享的物种,因此默认是不使用<X >stepacross。功能monoMDS不处理重复值充分,因此默认是使用isoMDS,始终有网站没有共享的物种stepacross。 engine = "isoMDS"触发的选项“stepacross。如果你不喜欢操纵原始的距离,你应该设置noshare。如果输入数据的不同点,而不是社会的数据,则跳过此步骤。此步骤进行使用noshare = FALSE。
NMDS with random starts: NMDS easily gets trapped into local optima, and you must start NMDS several times from random starts to be confident that you have found the global solution. The strategy in metaMDS is to first run NMDS starting with the metric scaling (cmdscale which usually finds a good solution but often close to a local optimum), or use the previous.best solution if supplied, and take its solution as the standard (Run 0). Then metaMDS starts NMDS from several random starts (maximum number is given by trymax). Function monoMDS defaults random starts, but isoMDS defaults to cmdscale, and there random starts are generated by initMDS. If a solution is better (has a lower stress) than the previous standard, it is taken as the new standard. If the solution is better or close to a standard, metaMDS compares two solutions using Procrustes analysis (function procrustes with option symmetric = TRUE). If the solutions are very similar in their Procrustes rmse and the largest residual is very small, the solutions are regarded as convergent and the better one is taken as the new standard. Please note that the conditions are stringent, and you may have found good and relatively stable solutions although the function is not yet satisfied. Setting trace = TRUE will monitor the final stresses, and plot = TRUE will display Procrustes overlay plots from each comparison. This step is performed using metaMDSiter. This is the only step performed if input data (comm) were dissimilarities.
NMDS随机开始:NMDS很容易陷入局部最优,您必须启动NMDS几次随机开始相信,你已经找到了全球性的解决方案。 metaMDS的战略是首先运行NMDS开始的度量尺度(cmdscale这通常是找到一个很好的解决方案,但往往接近一个局部最优),或使用previous.best解决方案如果提供为标准,并采取其解决方案(Run 0)。然后metaMDS开始NMDS从几个随机启动(最大数量trymax)。功能monoMDS默认随机启动,但isoMDS默认cmdscale,并有随机启动所产生的initMDS。如果一个解决方案是更好的,具有较低的压力比以前的标准,它被当作了新的标准。如果解决方案是更好或接近标准的,metaMDS比较两个解决方案使用普鲁克分析(函数procrustes选项symmetric = TRUE)。如果解决方案是在他们的Procrustes非常相似rmse和最大的残差是非常小的,这些解决方案被认为收敛性和更好的被作为新的标准。请注意,条件是严格的,你可能已经发现好和相对稳定的解决方案,虽然功能尚未满足。设置trace = TRUE监视最终的应力,和plot = TRUE将显示从每个比较的Procrustes覆盖图。此步骤进行使用metaMDSiter。这是唯一的步骤进行,如果输入数据(comm)是相异。
Scaling of the results: metaMDS will run postMDS for the final result. Function postMDS provides the following ways of “fixing” the indeterminacy of scaling and orientation of axes in NMDS: Centring moves the origin to the average of the axes; Principal components rotate the configuration so that the variance of points is maximized on first dimension (with function MDSrotate you can alternatively rotate the configuration so that the first axis is parallel to an environmental variable); Half-change scaling scales the configuration so that one unit means halving of community similarity from replicate similarity. Half-change scaling is based on closer dissimilarities where the relation between ordination distance and community dissimilarity is rather linear (the limit is set by argument threshold). If there are enough points below this threshold (controlled by the parameter nthreshold), dissimilarities are regressed on distances. The intercept of this regression is taken as the replicate dissimilarity, and half-change is the distance where similarity halves according to linear regression. Obviously the method is applicable only for dissimilarity indices scaled to 0 … 1, such as Kulczynski, Bray-Curtis and Canberra indices. If half-change scaling is not used, the ordination is scaled to the same range as the original dissimilarities.
缩放的结果:metaMDS运行postMDS的最终结果。功能postMDSNMDS轴的缩放比例和方向的不确定性“固定”提供以下几种:中心移动原点的轴的平均主成分的差异点是最大化的配置,使旋转第一个维度(功能MDSrotate,“你也可以转动第一轴是平行的一个环境变量)的配置,使半改变缩放比例配置,使一个单位减半复制相似的群落相似。更紧密的相异性之间的协调距离和社区相异的关系是相当线性的(限制设置参数threshold),半改变缩放的基础上。如果有足够的积分低于这个阈值(控制参数nthreshold),不同点是距离的回归。此回归截距被取为复制的相异度,和一半的变化是相似的距离,根据线性回归半部。显然,该方法仅适用于相异扩展到0 … 1,如Kulczynski,布雷柯蒂斯和堪培拉指数的指数。如果不使用半改变缩放,统筹进行缩放,以相同的范围内的原始的异同。
Species scores: Function adds the species scores to the final solution as weighted averages using function wascores with given value of parameter expand. The expansion of weighted averages can be undone with shrink = TRUE in plot or scores functions, and the calculation of species scores can be suppressed with wascores = FALSE.
种分数:功能增加了物种的分数,最终的解决方案,以加权平均数使用功能wascores给定值参数expand。可撤消的扩展加权平均数shrink = TRUE plot或scores功能,可以抑制wascores = FALSE和种分数的计算。
值----------Value----------
Function metaMDS returns an object of class metaMDS. The final site ordination is stored in the item points, and species ordination in the item species, and the stress in item stress (NB, the scaling of the stress depends on the engine: isoMDS uses percents, and monoMDS proportions in the range 0 … 1). The other items store the information on the steps taken and the items returned by the engine function. The object has print, plot, points and text methods. Functions metaMDSdist and metaMDSredist return vegdist objects. Function initMDS returns a random configuration which is intended to be used within isoMDS only. Functions metaMDSiter and postMDS returns the result of NMDS with updated
功能metaMDS返回一个对象类metaMDS。资料points,和物种中的资料的species的协调,并且项中的应力被存储在最终的地点协调stress(NB,缩放的应力取决于engine:isoMDS使用百分比,并monoMDS比例的范围内,0 … 1)。其他项目存储的返回engine功能上采取的措施和项目的信息。对象print,plot,points和text方法。功能metaMDSdist和metaMDSredist返回vegdist对象的。函数initMDS返回一个随机内isoMDS只拟使用的配置,该配置。功能metaMDSiter和postMDS返回结果的NMDS更新
警告----------Warning----------
metaMDS uses monoMDS as its NMDS engine from vegan version 2.0-0, when it replaced the isoMDS function. You can set argument
metaMDS使用monoMDS其NMDS enginevegan版本2.0-0,当它取代了isoMDS功能。您可以设置参数
注意----------Note----------
Function metaMDS is a simple wrapper for an NMDS engine (either monoMDS or isoMDS) and some support functions (metaMDSdist, stepacross, metaMDSiter, initMDS, postMDS, wascores). You can call these support functions separately for better control of results. Data transformation, dissimilarities and possible stepacross are made in function metaMDSdist which returns a dissimilarity result. Iterative search (with starting values from initMDS with monoMDS) is made in metaMDSiter. Processing of result configuration is done in postMDS, and species scores added by wascores. If you want to be more certain of reaching a global solution, you can compare results from several independent runs. You can also continue analysis from previous results or from your own configuration. Function may not save the used dissimilarity matrix (monoMDS does), but metaMDSredist tries to reconstruct the used dissimilarities with original data transformation and possible stepacross.
功能metaMDS是一个NMDS发动机(是monoMDS或isoMDS)和一些支持功能(metaMDSdist,stepacross,metaMDSiter的一个简单的包装initMDS,postMDS,wascores)。您可以调用这些的支持功能分别为更好的控制效果。数据转换,不同点和可能的stepacross是在功能metaMDSdist返回一个相异的结果。迭代搜索(与初始值从initMDSmonoMDS)metaMDSiter。在postMDS,和物种的分数添加wascores配置的结果进行处理。如果你想成为更有把握达到了一个全球性的解决方案,您可以从多个独立运行的结果进行比较。您还可以继续分析,从以前的结果,或从你自己的配置。功能可能无法保存相异度矩阵(monoMDS),但metaMDSredist尝试重建所使用的不同点与原始数据转换和可能的stepacross。
The metaMDS function was designed to be used with community data. If you have other type of data, you should probably set some arguments to non-default values: probably at least wascores, autotransform and noshare should be FALSE. If you have negative data entries, metaMDS will set the previous to FALSE with a warning.
metaMDS函数被设计为用于与社区数据。如果您有其他类型的数据,你应该设置一些参数,非默认值:,可能至少wascores,autotransform和noshare应该是FALSE。如果你有消极的数据项,metaMDS设置前FALSE警告。
(作者)----------Author(s)----------
Jari Oksanen
参考文献----------References----------
Compositional dissimilarity as a robust measure of ecological distance. Vegetatio 69, 57–68.
of techniques for ecological ordinations. Vegetatio 69, 89–107.
参见----------See Also----------
monoMDS (and isoMDS), decostand, wisconsin, vegdist, rankindex, stepacross, procrustes, wascores, MDSrotate, ordiplot.
monoMDS(和isoMDS)decostand,wisconsin,vegdist,rankindex,stepacross,procrustes, wascores,MDSrotate,ordiplot。
实例----------Examples----------
## The recommended way of running NMDS (Minchin 1987)[#推荐的方式运行NMDS(明钦1987)]
##[#]
data(dune)
# Global NMDS using monoMDS[全球NMDS monoMDS]
sol <- metaMDS(dune)
sol
plot(sol, type="t")
## Start from previous best solution[#开始从以前的最好的解决方案]
sol <- metaMDS(dune, previous.best = sol)
## Local NMDS and stress 2 of monoMDS[#本地NMDS和压力的monoMDS]
sol2 <- metaMDS(dune, model = "local", stress=2)
sol2
## Use Arrhenius exponent 'z' as a binary dissimilarity measure[#使用阿累尼乌斯指数Z为二进制相异措施]
sol <- metaMDS(dune, distfun = betadiver, distance = "z")
sol
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|