Function lrcco
is a wrapper function around canocov
. It performs logratio canonical correlation analysis (LR-CCO) accepting
two compositional data matrices as input.
lrcco(X, Y)
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
The matrix of X compositions
The matrix of Y compositions
Jan Graffelman jan.graffelman@upc.edu
Matrices X
and Y
are assumed to contain positive elements only, and there rows sum to one.
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.
Graffelman, J. and Pawlowsky-Glahn, V. and Egozcue, J.J. and Buccianti, A. (2018) Exploration of geochemical data with compositional canonical biplots, Journal of Geochemical Exploration 194, pp. 120--133. tools:::Rd_expr_doi("10.1016/j.gexplo.2018.07.014")
cancor
,canocov
set.seed(123)
X <- matrix(runif(75),ncol=3)
Y <- matrix(runif(75),ncol=3)
Xc <- X/rowSums(X) # create compositions by closure
Yc <- Y/rowSums(Y)
out.lrcco <- lrcco(X,Y)
Run the code above in your browser using DataLab