CCA {MVar}R Documentation

Canonical Correlation Analysis(CCA).

Description

Perform Canonical Correlation Analysis (CCA) on a data set.

Usage

CCA(X = NULL, Y = NULL, type = 1, test = "Bartlett", sign = 0.05)

Arguments

X

First group of variables of a data set.

Y

Second group of variables of a data set.

type

1 for analysis using the covariance matrix (default),
2 for analysis using the correlation matrix.

test

Test of significance of the relationship between the group X and Y:
"Bartlett" (default) or "Rao".

sign

Test significance level (default 5%).

Value

Cxx

Covariance matrix or correlation Cxx.

Cyy

Covariance matrix or correlation Cyy.

Cxy

Covariance matrix or correlation Cxy.

Cyx

Covariance matrix or correlation Cyx.

var.UV

Matrix with eigenvalues (variances) of the canonical pairs U and V.

corr.UV

Matrix of the correlation of the canonical pairs U and V.

coef.X

Matrix of the canonical coefficients of the group X.

coef.Y

Matrix of the canonical coefficients of the group Y.

corr.X

Matrix of the correlations between canonical variables and the original variables of the group X.

corr.Y

Matrix of the correlations between the canonical variables and the original variables of the group Y.

score.X

Matrix with the scores of the group X.

score.Y

Matrix with the scores of the group Y.

sigtest

Returns the significance test of the relationship between group X and Y: "Bartlett" (default) or "Rao".

Author(s)

Paulo Cesar Ossani

Marcelo Angelo Cirillo

References

Mingoti, S. A. Analise de dados atraves de metodos de estatistica multivariada: uma abordagem aplicada. Belo Horizonte: UFMG, 2005. 297 p.

Ferreira, D. F. Estatistica Multivariada. 2a ed. revisada e ampliada. Lavras: Editora UFLA, 2011. 676 p.

Rencher, A. C. Methods of multivariate analysis. 2th. ed. New York: J.Wiley, 2002. 708 p.

Lattin, J.; Carrol, J. D.; Green, P. E. Analise de dados multivariados. 1th. ed. Sao Paulo: Cengage Learning, 2011. 455 p.

See Also

Plot.CCA

Examples

data(DataMix) # data set

data <- DataMix[,2:ncol(DataMix)]

rownames(data) <- DataMix[,1]

X <- data[,1:2]

Y <- data[,5:6]

res <- CCA(X, Y, type = 2, test = "Bartlett", sign = 0.05)

print("Matrix with eigenvalues (variances) of the canonical pairs U and V:"); round(res$var.UV,3)

print("Matrix of the correlation of the canonical pairs U and V:"); round(res$corr.UV,3)

print("Matrix of the canonical coefficients of the group X:"); round(res$coef.X,3)

print("Matrix of the canonical coefficients of the group Y:"); round(res$coef.Y,3)

print("Matrix of the correlations between the canonical 
       variables and the original variables of the group X:"); round(res$corr.X,3)

print("Matrix of the correlations between the canonical 
       variables and the original variables of the group Y:"); round(res$corr.Y,3)

print("Matrix with the scores of the group X:"); round(res$score.X,3)

print("Matrix with the scores of the group Y:"); round(res$score.Y,3)

print("test of significance of the canonical pairs:"); res$sigtest

[Package MVar version 2.2.2 Index]