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

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

[复制链接]
发表于 2012-10-2 07:29:02 | 显示全部楼层 |阅读模式
cca(yacca)
cca()所属R语言包:yacca

                                         Canonical Correlation Analysis
                                         典型相关分析

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

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

Performs a canonical correlation (and canonical redundancy) analysis on two sets of variables.
执行一个典型相关分析(和规范冗余)两组变量。


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


cca(x, y, xlab = colnames(x), ylab = colnames(y), xcenter = TRUE,
    ycenter = TRUE, xscale = FALSE, yscale = FALSE,
    standardize.scores = TRUE, use = "complete.obs", na.rm = TRUE)

## S3 method for class 'cca'
plot(x, ...)

## S3 method for class 'cca'
print(x, ...)

## S3 method for class 'cca'
summary(object, ...)



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

参数:x
for cca, a single vector or a matrix whose columns contain the x variables.  Otherwise, a cca object.   
为cca,一个向量或矩阵的列包含x变量。否则,cca对象。


参数:y
a single vector or a matrix whose columns contain the x variables.  
一个向量或矩阵的列包含x变量。


参数:xlab
an optional vector of x labels.  
一个可选的向量x标签。


参数:ylab
an optional vector of y labels.  
一个可选的向量y标签。


参数:xcenter
boolean; demean the x variables?  
布尔值;贬低x的变量?


参数:ycenter
boolean; demean the y variables?  
布尔值;贬低y的变量?


参数:xscale
boolean; scale the x variables to unit variance?  
布尔值;规模的x变量单位变化?


参数:yscale
boolean; scale the y variables to unit variance?  
布尔值;规模的y变量单位变化?


参数:standardize.scores
boolean; rescale scores (and coefficients) to produce scores of unit variance?
布尔的重新调整分数(系数)产生单位方差的分数?


参数:use
use argument to be passed to var when creating covariance matrices.  
use参数传递给var的当协方差矩阵。


参数:na.rm
boolean; remove missing values during redundancy analysis?  
布尔值;消除在冗余分析遗漏值的吗?


参数:object
a cca object.
一个cca对象。


参数:...
additional arguments.
其他参数。


Details

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

Canonical correlation analysis (CCA) is a form of linear subspace analysis, and involves the projection of two sets of vectors (here, the variable sets x and y) onto a joint subspace.  The goal of (CCA) is to find a squence of linear transformations of each variable set, such that the correlations between the transformed variables are maximized (under the proviso that each transformed variable must be orthogonal to those preceding it).  These transformed variables – known as “canonical variates” (CVs) – can be thought of as expressing the common variation across the data sets, in a manner analogous to the role of principal components in within-set analysis (see, e.g., princomp).  Since the rank of the joint subspace is equal to the minimum of the ranks of the two spaces spanned by the initial data vectors, it follows that the number of CVs will usually be equal to the minimum of the number of x and y variables (perhaps fewer, if the sets are not of full rank).
典型相关分析(CCA)是一种形式的线性子空间分析,以及涉及的投影的两组向量(这里,变量设置x和y)到关节子空间。 (CCA)的目标是找到一个squence每个变量集的线性变换,使得变换后的变量之间的相关性最大化(根据每个变换的变量的条件是必须是那些在它之前正交)。这些变换后的变量 - 被称为“典型变量”(简历) - 可以被认为是表达的共同的整个数据集的变化,在类似的方式,以在集内的主成分分析的作用(参见,例如princomp“)。的联合子空间的秩等于最低跨越两个空间的初始数据向量的行列,它的CV数通常等于最低的数量x y变量(或许更少,如果集合是满秩)。

Formally, we may describe the CCA solution as follows.  Given data matrices X and Y, let Cxx, Cxy, Cyx and Cyy be the respective sample covariance matrices for X versus itself, X versus Y, Y versus X, and Y versus itself.  Now, for some i less than or equal to the minimum rank of X and Y, let u_i be the ith eigenvector of Cxx^-1 %*% Cxy %*% Cyy^-1 %*% Cyx, with corresponding eigenvalue λ_i.  Then the vector u_i contains the coefficients projecting X onto the i th canonical variate; the corresponding scores are given by X %*% u_i.  Similarly, let v_i be the ith eigenvector of Cyy^-1 %*% Cyx %*% Cxx^-1 %*% Cxy.  Then v_i contains the coefficients projecting Y onto the ith canonical variate (with scores Y %*% v_i).  The eigenvalue in the second case will be the same as the first, and corresponds to the square of the ith canonical correlation for the CCA solution – that is, the correlation between the X and Y scores on the ith canonical variate.  Since the canonical correlation structure is unaffected by rescaling of the canonical variate scores, it is common to adjust the coefficients u_i and v_i to ensure that the resulting scores have unit variance; this option is controlled here via the standardize.scores argument.
在形式上,我们可以如下描述的CCA解决方案。由于数据矩阵X和Y,让Cxx,Cxy,Cyx和Cyy是相应的样本协方差矩阵X与本身的,X与Y,Y与X和Y与本身。现在,一些i小于或等于最低等级X和Y,让我们u_ii个特征向量Cxx^-1 %*% Cxy %*% Cyy^-1 %*% Cyx ,用相应的特征值λ_i。然后,向量u_i系数投影X到i 个典型变量,给出相应得分,由X %*% u_i。同样,让我们v_i是i个特征向量的Cyy^-1 %*% Cyx %*% Cxx^-1 %*% Cxy。 v_i包含系数预测Y到i个典型变量(得分Y %*% v_i)。在第二种情况下的特征值将与第一次相同,对应的平方i个典型相关的CCA解决方案 - 也就是说,之间的相关性X和Yi个典型变量得分。由于典型相关结构是通过重新缩放的典型变量得分的影响,它是常见的调整系数u_i和v_i,以确保所得分数有单位方差;此处通过这个选项控制standardize.scores的说法。

CCA output can be fairly complex.  Quantities of particular interest include the correlations between the original variables in each set and their respective canonical variates (structural correlations or loadings), the coefficients which take the original variables into the CVs, and of course the correlations between the CV scores in one set and their corresponding scores in the opposite set (the canonical correlations).  The canonical correlations provide a basic measure of concordance between the transformed variables, but are surprisingly uninformative by themselves; canonical redundancies (see below) are of more typical interest.  Interpretation of CVs is usually performed by inspection of loadings, which reveal the extent to which each CV is associated with particular variables in each set.  The squared loadings, in particular, convey the fraction of variance in each original variable which is accounted for by a given CV (though not necessarily by the variables in the opposite set!).
CCA输出可以是相当复杂的。特别感兴趣的数量时包括每个集合中的各自的典型变量(结构的相关性或负荷),取原变量的系数成的CV,原始变量之间的相关性和当然的CV在一组分数之间的相关性其相应的分数中的相对的一组(典型相关)。规范的相互关系提供了一个基本尺度转换的变量之间的一致性,但无信息本身是令人惊讶的,,规范裁员(见下文)是比较典型的。通常是由负荷,这揭示每个CV在何种程度上是与每个集合中的特定变量进行检查的CV解读。平方的负荷,特别是传达这是占了一个给定的CV(虽然不一定是相对的一组中的变量!)在各原始变量的方差的比例。

A common interest in the context of CCA is the extent to which the variance of one set of variables can be accounted for by the other (in the usual least squares sense).  While it is tempting to interpret the squared canonical correlations in this manner, this is incorrect: the squared canonical correlations convey the fraction of variance in the CV scores from one variable set which can be accounted for by scores from the other, but say nothing about the extent to which the CVs themselves account for variation in the original variables.  The variance in one set explainable by the other is instead expressed via the so-called redundancy index, which combines the squared canonical correlations with the canonical adequacy (within-set variance accounted for) for each CV.  The use of the redundancy index in this way is sometimes called “(canonical) redundancy analysis”, although it is simply an alternate means of presenting CCA results.
一个共同利益的背景下,CCA是在何种程度上可以解释为一组变量的方差(在通常的最小二乘意义)。虽然它是试图解释这种方式的典型相关的平方,这是不正确的:典型相关平方传达方差的比例可占的分数从其他CV分数从一个变量集,但只字不提在何种程度上自己的简历占原始变量的变化。在一组解释由其他的方差,而不是通过所谓的冗余指数,相结合的典型相关平方与规范充足(占组内方差)为每个CV表示。以这种方式使用的冗余指数有时被称为“(规范)冗余分析”,尽管它是一个简单的替代手段呈列CCA排序结果。

As the name of the technique implies, CCA is a symmetric procedure: the designation of one variable set as x and another as y is arbitrary, and may be reversed without incident.  (Note, however, that the coefficients and redundancies are set-specific, and will also be reversed in this case.)  CCA with one x or y variable is equivalent to OLS regression (with the squared canonical correlation corresponding to the R^2), and CCA on one variable pair yields the familiar Pearson product-moment correlation.  Centering and scaling data prior to analysis is equivalent to working with correlation matrices in the underlying analysis (with interpretation/effects analogous to the principal components case).
的技术,正如它的名字所暗示的,CCA是一个对称的程序:指定一个变量设置为x,另一个作为y是任意的,可以逆转没有发生任何事件。 (注意,但是,系数和冗余设置特定的,在这种情况下,也会是相反的。)CCA与一个x或y变量是等同于OLS回归(平方规范相关对应的R^2),CCA对一个变量对产生熟悉的皮尔逊积矩相关。中心和缩放数据分析之前,相当于工作相关矩阵的基本分析(解释/效果类似的主要组成部分的情况下)。


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

An object of class cca, whose elements are as follows:
的对象类的cca,其要点如下:


参数:corr
Canonical correlations.
典型相关分析。


参数:corrsq
Squared canonical correlations (shared variance across canonical variates).
平方典型相关分析(典型变量之间的共享方差)。


参数:xcoef
Coefficients for the x variables on each canonical variate.
x变量对每个典型变量的系数。


参数:ycoef
Coefficients for the y variables on each canonical variate.
y变量对每个典型变量的系数。


参数:canvarx
Canonical variate scores for the x variables.
典型变量得分为x变量。


参数:canvary
Canonical variate scores for the y variables.
典型变量得分为y变量。


参数:xstructcorr
Structural correlations (loadings) for x variables on each canonical variate.
结构的相关性(负荷)x每个典型变量的变量。


参数:ystructcorr
Structural correlations (loadings) for y variables on each canonical variate.
结构的相关性(负荷)y每个典型变量的变量。


参数:xstructcorrsq
Squared structural correlations for x variables on each canonical variate (i.e., fraction of x variance associated with each variate).
方格结构x每个典型变量(即小部分x方差与各变量)变量的相关性。


参数:ystructcorrsq
Squared structural correlations for y variables on each canonical variate (i.e., fraction of y variance associated with each variate).
方格结构y每个典型变量(即小部分y方差与各变量)变量的相关性。


参数:xcrosscorr
Canonical cross-loadings for x variables on the y scores for each canonical variate.
典型的交叉负荷为xy分数各典型变量的变量。


参数:ycrosscorr
Canonical cross-loadings for y variables on the y scores for each canonical variate.
典型的交叉负荷为yy分数各典型变量的变量。


参数:xcrosscorrsq
Squared canonical cross-loadings for x variables on the y scores for each canonical variate (i.e., the fraction of variance in each x variable attributable to y through the respective CVs).
平方典型的交叉负载x变量y每个典型变量分数(即在每一个x变量应占分数的方差y通过各自的简历)。


参数:ycrosscorrsq
Squared canonical cross-loadings for y variables on the x scores for each canonical variate (i.e., the fraction of variance in each y variable attributable to x through the respective CVs).
平方典型的交叉负载y变量x每个典型变量分数(即在每一个y变量应占分数的方差x通过各自的简历)。


参数:xcancom
Canonical communalities for x variables (for each x variable, fraction associated with all canonical variates).
典型的共同性x变量(每一个x变量,分数与所有典型变量)。


参数:ycancom
Canonical communalities for y variables (for each y variable, fraction associated with all canonical variates).
典型的共同性y变量(每一个y变量,分数与所有典型变量)。


参数:xcanvad
Canonical variate adequacies for x variables (for each canonical variate, fraction of total x variance for which it is associated).
典型变量排水量x变量(为每个典型变量,分数它相关联的总x方差)。


参数:ycanvad
Canonical variate adequacies for y variables (for each canonical variate, fraction of total y variance for which it is associated).
典型变量排水量y变量(为每个典型变量,分数它相关联的总y方差)。


参数:xvrd
Canonical redundancies for x variables (i.e., total fraction of x variance accounted for by y variables, through each canonical variate).
规范裁员x变量(即总分数x方差占y变量,通过每个典型变量)。


参数:yvrd
Canonical redundancies for y variables (i.e., total fraction of y variance accounted for by x variables, through each canonical variate).
规范裁员y变量(即总分数y方差占x变量,通过每个典型变量)。


参数:xrd
Total canonical redundancy for x variables (i.e., total fraction of x variance accounted for by y variables, through all canonical variates).
总的典范冗余x变量(即总分数x方差占y变量,通过典型变量)。


参数:yrd
Total canonical redundancy for y variables (i.e., total fraction of y variance accounted for by x variables, through all canonical variates).
总的典范冗余y变量(即总分数y方差占x变量,通过典型变量)。


参数:chisq
Sequential chi-squared values for tests of each respective canonical variate using Bartlett's omnibus statistic.
连续chi-squared各自的典型变量使用巴特利特的综合统计测试值。


参数:df
Degrees of freedom for Bartlett's test.
度自由巴特利特的测试。


参数:xlab
Variable names for x.
变量名x。


参数:ylab
Variable names for y.
变量名y。


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


Carter T. Butts <buttsc@uci.edu>



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

<h3>See Also</h3>

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


#Example parallels the R builtin cancor example[例如平行的R内建cancor例如]
data(LifeCycleSavings)
pop <- LifeCycleSavings[, 2:3]
oec <- LifeCycleSavings[, -(2:3)]
cca.fit <- cca(pop, oec)

#View the results[查看结果]
cca.fit
summary(cca.fit)
plot(cca.fit)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-24 06:41 , Processed in 0.026122 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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