Function canocov
performs a canonical correlation analysis. It
operates on raw data matrices, which are only centered in the
program. It uses generalized inverses and can deal with structurally
singular covariance matrices.
canocov(X, Y)
The n times p X matrix of observations
The n times q Y matrix of observations
Returns a list with the following results
the canonical correlations
canonical weights of the X variables
canonical weights of the Y variables
canonical X variates
canonical Y variates
biplot markers for X variables (standard coordinates)
biplot markers for Y variables (standard coordinates)
biplot markers for X variables (principal coordinates)
biplot markers for Y variables (principal coordinates)
canonical loadings, (correlations X variables, canonical X variates)
canonical loadings, (correlations X variables, canonical Y variates)
canonical loadings, (correlations Y variables, canonical X variates)
canonical loadings, (correlations Y variables, canonical Y variates)
covariance X variables, canonical X variates
covariance X variables, canonical Y variates
covariance Y variables, canonical X variates
covariance Y variables, canonical Y variates
goodness of fit of the between-set correlation matrix
adequacy coefficients of X variables
redundancy coefficients of X variables
adequacy coefficients of Y variables
redundancy coefficients of Y variables
canocov
computes the solution by a singular value
decomposition of the transformed between set covariance matrix.
Hotelling, H. (1935) The most predictable criterion. Journal of Educational Psychology (26) pp. 139-142.
Hotelling, H. (1936) Relations between two sets of variates. Biometrika (28) pp. 321-377.
Johnson, R. A. and Wichern, D. W. (2002) Applied Multivariate Statistical Analysis. New Jersey: Prentice Hall.
# NOT RUN {
set.seed(123)
X <- matrix(runif(75),ncol=3)
Y <- matrix(runif(75),ncol=3)
cca.results <- canocov(X,Y)
# }
Run the code above in your browser using DataCamp Workspace