找回密码
 注册
查看: 3301|回复: 0

R语言 vegan包 cca()函数中文帮助文档(中英文对照)

  [复制链接]
发表于 2012-10-1 15:04:37 | 显示全部楼层 |阅读模式
cca(vegan)
cca()所属R语言包:vegan

                                         [Partial] [Constrained] Correspondence Analysis and Redundancy
                                         [部分] [约束]对应分析和冗余

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Function cca performs correspondence analysis, or optionally constrained correspondence analysis (a.k.a. canonical correspondence analysis), or optionally partial constrained correspondence analysis. Function rda performs redundancy analysis, or optionally principal components analysis. These are all very popular ordination techniques in community ecology.
函数cca进行对应分析,或选择地进行约束的对应分析(又名典范对应分析),或可选择部分约束的对应分析。函数rda进行冗余分析,或可选的主成分分析。这些都是非常受欢迎的社会生态的协调技术。


用法----------Usage----------


## S3 method for class 'formula'[类formula的方法]
cca(formula, data, na.action = na.fail, subset = NULL,
  ...)
## Default S3 method:[默认方法]
cca(X, Y, Z, ...)
## S3 method for class 'formula'[类formula的方法]
rda(formula, data, scale=FALSE, na.action = na.fail,
  subset = NULL, ...)
## Default S3 method:[默认方法]
rda(X, Y, Z, scale=FALSE, ...)



参数----------Arguments----------

参数:formula
Model formula, where the left hand side gives the community data matrix, right hand side gives the constraining variables, and conditioning variables can be given within a special function Condition.
给出了社区数据矩阵模型公式中,左手侧,右手侧给出了约束的变量,和条件变量可以给出一个特殊的功能Condition内。


参数:data
Data frame containing the variables on the right hand side of the model formula.
数据框包含的变量,在右手侧的模型公式。


参数:X
Community data matrix.  
社区数据矩阵。


参数:Y
Constraining matrix, typically of environmental variables. Can be missing.  
约束矩阵,通常的环境变量。可缺少的。


参数:Z
Conditioning matrix, the effect of which is removed ("partialled out") before next step. Can be missing.
空调矩阵,其效果被除去(partialled满分),在下一步骤之前。可缺少的。


参数:scale
Scale species to unit variance (like correlations).
规模物种到单位方差(如相关)。


参数:na.action
Handling of missing values in constraints or conditions. The default (na.fail) is to stop with missing value. Choice na.omit removes all rows with missing values. Choice na.exclude keeps all observations but gives NA for results that cannot be calculated. The WA scores of rows may be found also for missing values in constraints. Missing values are never allowed in dependent community data.  
处理缺失值的限制或条件。的默认(na.fail)停止遗漏值。选择na.omit中删除所有行为遗漏值。选择na.exclude保留所有意见,但给NA无法计算的结果。 WA行分数也可能会发现遗漏值的约束。决不允许遗漏值在依赖社会数据。


参数:subset
Subset of data rows. This can be a logical vector which is TRUE for kept observations, or a logical expression which can contain variables in the working environment, data or species names of the community data.
数据行的子集。这是一个逻辑向量,这是TRUE保持观察,或一个逻辑表达式,它可以包含在工作环境中的变量,data或种名社会数据。


参数:...
Other arguments for print or plot functions (ignored in other functions).
其他参数为print或plot功能(忽略其他功能)。


Details

详细信息----------Details----------

Since their introduction (ter Braak 1986), constrained, or canonical, correspondence analysis and its spin-off, redundancy analysis, have been the most popular ordination methods in community ecology. Functions cca and rda are  similar to popular proprietary software Canoco, although the implementation is completely different.  The functions are based on Legendre & Legendre's (1998) algorithm: in cca Chi-square transformed data matrix is subjected to weighted linear regression on constraining variables, and the fitted values are submitted to correspondence analysis performed via singular value decomposition (svd). Function rda is similar, but uses ordinary, unweighted linear regression and unweighted SVD.
由于他们的介绍(之三Braak 1986),约束,或规范,对应分析,分拆,冗余分析,一直最流行的社会生态的协调方法。功能cca和rda流行的专有软件Canoco类似,虽然执行是完全不同的。的功能是基于勒让德和勒让德(1998)的算法:在cca卡方转换后的数据矩阵受到制约变量的加权线性回归,并通过奇异值分解的拟合值提交给对应分析进行(svd“)。功能rda是相似的,但使用普通的线性回归,加权和不加权的奇异值分解。

The functions can be called either with matrix-like entries for community data and constraints, or with formula interface.  In general, the formula interface is preferred, because it allows a better control of the model and allows factor constraints.
该函数可以被调用,也可以与基质等为社区数据和约束的条目,或与式接口。在一般情况下,式接口是优选的,因为它允许一个更好的控制模型,并允许因数限制。

In the following sections, X, Y and Z, although referred to as matrices, are more commonly data frames.
在下面的章节中,X,Y和Z,虽然简称为矩阵,更常见的数据框。

In the matrix interface, the community data matrix X must be given, but the other data matrices may be omitted, and the corresponding stage of analysis is skipped.  If matrix Z is supplied, its effects are removed from the community matrix, and the residual matrix is submitted to the next stage.  This is called "partial" correspondence or redundancy analysis.  If matrix Y is supplied, it is used to constrain the ordination, resulting in constrained or canonical correspondence analysis, or redundancy analysis. Finally, the residual is submitted to ordinary correspondence analysis (or principal components analysis).  If both matrices Z and Y are missing, the data matrix is analysed by ordinary correspondence analysis (or principal components analysis).
矩阵中的接口,社区数据矩阵X必须得到,但也可以省略的其他数据矩阵,并分析相应的阶段被跳过。如果矩阵Z被提供,它的效果是从社区矩阵除去,和残余基质被提交到下一阶段。这就是所谓的部分的信函或冗余分析。如果矩阵Y提供,它是用来约束的协调,从而在有限的或典范对应分析,或冗余分析。最后,剩余的被提交到普通的对应分析(主成分分析)。如果这两个矩阵Z和Y缺少,数据矩阵进行分析的普通对应分析(主成分分析)。

Instead of separate matrices, the model can be defined using a model formula.  The left hand side must be the community data matrix (X).  The right hand side defines the constraining model. The constraints can contain ordered or unordered factors, interactions among variables and functions of variables.  The defined contrasts are honoured in factor variables.  The constraints can also be matrices (but not data frames). The formula can include a special term Condition for conditioning variables (“covariables”) “partialled out” before analysis.  So the following commands are equivalent: cca(X, Y,     Z), cca(X ~ Y + Condition(Z)), where Y and Z refer to constraints and conditions matrices respectively.
而不是单独的矩阵,该模型可以定义一个模型formula。左边必须是社会数据矩阵(X)。右边定义的约束模型。约束可以包含有序或无序的因素,变量和函数,变量之间的相互作用。定义的contrasts很荣幸在factor变量。的制约,也可以是矩阵(但不包括数据框)。该公式可以包括一个专用名词Condition调节变量(“协变量”)“partialled”前分析。因此,下面的命令是等价的:cca(X, Y,     Z),cca(X ~ Y + Condition(Z)),其中Y和Z的制约因素和条件矩阵分别。

Constrained correspondence analysis is indeed a constrained method: CCA does not try to display all variation in the data, but only the part that can be explained by the used constraints. Consequently, the results are strongly dependent on the set of constraints and their transformations or interactions among the constraints.  The shotgun method is to use all environmental variables as constraints.  However, such exploratory problems are better analysed with unconstrained methods such as correspondence analysis (decorana, corresp) or non-metric multidimensional scaling (metaMDS) and environmental interpretation after analysis (envfit, ordisurf). CCA is a good choice if the user has clear and strong a priori hypotheses on constraints and is not interested in the major structure in the data set.  
约束对应分析的确是一个约束的方法:CCA不尝试显示在数据中的所有的变化,但只有一部分,可以被解释为所用的约束。因此,结果是强烈地依赖于组约束和其转换或相互作用之间的约束。鸟枪法是使用的所有环境变量的制约因素。然而,这样的探索性问题,更好地分析与无约束的方法,如对应分析(decorana,corresp)和非度量多维尺度(metaMDS)与环境解释后分析(<X >,envfit)。 CCA是一个不错的选择,如果用户有清晰而强烈的先验假设的约束和不感兴趣的主要结构数据集。

CCA is able to correct the curve artefact commonly found in correspondence analysis by forcing the configuration into linear constraints.  However, the curve artefact can be avoided only with a low number of constraints that do not have a curvilinear relation with each other.  The curve can reappear even with two badly chosen constraints or a single factor.  Although the formula interface makes easy to include polynomial or interaction terms, such terms often produce curved artefacts (that are difficult to interpret), these should probably be avoided.
CCA是能够纠正对应分析中常见的强迫配置到线性约束曲线的人工制品。然而,应避免曲线人工制品可以仅与不具有相互关系的曲线的约束的数量较少。曲线可以重新出现,甚至有两个选择严重限制,或一个单一的因素。虽然此公式的界面使得很容易地包括,多项式或互动方式,这种条款往往会产生弯曲文物(很难解释),这应该是可以避免的。

According to folklore, rda should be used with &ldquo;short gradients&rdquo; rather than cca. However, this is not based on research which finds methods based on Euclidean metric as uniformly weaker than those based on Chi-squared metric.  However, standardized Euclidean distance may be an appropriate measures (see Hellinger standardization in decostand in particular).
据民间传说,rda应使用“短梯度”,而不是cca。然而,这是没有根据的研究,发现基于均匀弱比卡方度量的基础上的欧氏度量的方法。然而,标准化欧式距离可能是一个适当的措施(见海灵格的标准化decostand特别是)。

Partial CCA (pCCA; or alternatively partial RDA) can be used to remove the effect of some conditioning or &ldquo;background&rdquo; or &ldquo;random&rdquo; variables or &ldquo;covariables&rdquo; before CCA proper.  In fact, pCCA compares models cca(X ~ Z) and cca(X ~ Y + Z) and attributes their difference to the effect of Y cleansed of the effect of Z.  Some people have used the method for extracting &ldquo;components of variance&rdquo; in CCA.  However, if the effect of variables together is stronger than sum of both separately, this can increase total Chi-square after &ldquo;partialling out&rdquo; some variation, and give negative &ldquo;components of variance&rdquo;.  In general, such components of &ldquo;variance&rdquo; are not to be trusted due to interactions between two sets of variables.
部分CCA(PCCA;或交替局部RDA)可以用来去除一些调理或“背景”或“随机”的变量或“协变量”之前CCA适当的效果。事实上,PCCA比较模型cca(X ~ Z)和cca(X ~ Y + Z)和属性,它们的区别Y效果Z清洗的效果。有人曾用的方法提取成分的差异“CCA”。然而,如果变量一起的效果是强于两个分开的总和,这可以增加总卡方后“partialling”的一些变化,给负“组件方差”。在一般情况下,这样的组件的“方差”不被信任由于两套的变量之间的相互作用。

The functions have summary and plot methods which are documented separately (see plot.cca, summary.cca).
该功能有summary和plot方法记录(见plot.cca,summary.cca)。


值----------Value----------

Function cca returns a huge object of class cca, which is described separately in cca.object.
函数cca类cca,分别在cca.object返回一个巨大的物体。

Function rda returns an object of class rda which inherits from class cca and is described in cca.object. The scaling used in rda scores is described in a separate vignette with this package.
功能rda返回一个类的对象rda继承自类cca,并在cca.object。 rda分数的换算中使用的这个包在一个单独的小插曲。


(作者)----------Author(s)----------



The responsible author was Jari Oksanen, but the code borrows heavily
from Dave Roberts (<a href="http://labdsv.nr.usu.edu/">http://labdsv.nr.usu.edu/</a>).




参考文献----------References----------

implementations follows Legendre and Legendre.
ed. Elsevier.
correspondence analysis. Ecology <STRONG>78</STRONG>, 2617-2623.
advantages of canonical correspondence analysis.  Ecology <STRONG>74</STRONG>,2215-2230.
eigenvector technique for multivariate direct gradient analysis. Ecology <STRONG>67</STRONG>, 1167-1179.

参见----------See Also----------

There is a special documentation for plot.cca and summary.cca functions with their helper functions (text.cca, points.cca, scores.cca). Function anova.cca provides an ANOVA like permutation test for the &ldquo;significance&rdquo; of constraints. Automatic model building (dangerous!) is discussed in deviance.cca.  Diagnostic tools, prediction and adding new points in ordination are discussed in goodness.cca and predict.cca. Function  cca (library ade4) provide alternative implementations of CCA (these are internally quite different). Function capscale is a non-Euclidean generalization of rda. The result object is described in cca.object. You can use as.mlm to refit ordination result as a multiple response linear model to find some descriptive statistics. Design decisions are explained in vignette "decision-vegan" which also can be accessed with vegandocs.  
有一个特殊的文档plot.cca和summary.cca功能的辅助功能(text.cca,points.cca,scores.cca)。功能anova.cca提供了一个的ANOVA像置换检验的“意义”的约束。在deviance.cca自动模式的建设(dangerous!)进行了讨论。在goodness.cca和predict.cca诊断工具,预测和讨论了增加新的点协调。功能cca(库ade4)提供替代实现CCA(这是内部相当不同的)。函数capscale是一个非欧几里德的推广rda。结果对象中描述cca.object。您可以使用as.mlm改装协调多响应线性模型找到一些描述性统计结果。设计决策的解释vignettedecision-vegan也可以访问vegandocs。


实例----------Examples----------


data(varespec)
data(varechem)
## Common but bad way: use all variables you happen to have in your[#通用的,但糟糕的方式使用所有的变量你碰巧有您的]
## environmental data matrix[#环境数据矩阵]
vare.cca <- cca(varespec, varechem)
vare.cca
plot(vare.cca)
## Formula interface and a better model[#公式接口和一个更好的模型]
vare.cca <- cca(varespec ~ Al + P*(K + Baresoil), data=varechem)
vare.cca
plot(vare.cca)
## `Partialling out' and `negative components of variance'[#Partialling和负分量的方差“]
cca(varespec ~ Ca, varechem)
cca(varespec ~ Ca + Condition(pH), varechem)
## RDA[#RDA]
data(dune)
data(dune.env)
dune.Manure <- rda(dune ~ Manure, dune.env)
plot(dune.Manure)
## For further documentation:[#提供进一步的文件:]
## Not run: [#不运行:]
vegandocs("decision")

## End(Not run)[#(不执行)]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-13 11:49 , Processed in 0.027491 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表