SparseCCA {CVR}R Documentation

Sparse canonical correlation analysis.


Get sparse CCA solutions of X1 and X2. Use CCA and CCA.permute from PMA package. See PMA package for details.


SparseCCA(X1, X2, rank = 2, penaltyx1 = NULL, penaltyx2 = NULL, 
             nperms = 25, ifplot = 0)


X1, X2

Numeric matrices representing the two sets of covariates. They should have the same number of rows and cannot contain missing values.


The number of canonical variate pairs wanted. The default is 2.

penaltyx1, penaltyx2

Numeric vectors as the penalties to be applied to X1 and X2. The defaults are seq(0.1, 0.7, len = 20). See PMA package for details.


Number of times the data should be permuted. The default is 25. Don't use too small value. See PMA package for details.


0 or 1. The default is 0 which means don't plot the result. See PMA package for details.


This function is generally used for tuning the penalties in sparse CCA if penaltyx1 and penaltyx2 are supplied as vectors. The CCA solution is based on PMD algorithm and the tuning is based on permutation. The fitted W1 and W2 are scaled so that the diagonals of W1'X1'X1W1 and W2'X2'X2W2 are all 1's.

Specifically, if a single value of mild penalty is provided for both penaltyx1 and penaltyx2, the result can be used as initial values of W's in CVR. For instance, with penaltyx1 = 0.7 and penaltyx2 = 0.7, the fitted W1 and W2 are only shrinked, but mostly not zero yet.



Loading matrix corresponding to X1. X1*W1 gives the canonical variates from X1.


Loading matrix corresponding to X2. X2*W2 gives the canonical variates from X2.


Chongliang Luo, Kun Chen.


Daniela M. Witten, Robert Tibshirani and Trevor Hastie (2009) A penalized matrix decomposition, with applications to sparse principal components and canonical correlation analysis. Biostatistics 10(3), 515-534.

Chongliang Luo, Jin Liu, Dipak D. Dey and Kun Chen (2016) Canonical variate regression. Biostatistics, doi: 10.1093/biostatistics/kxw001.

See Also

CVR, CCA, CCA.permute.

[Package CVR version 0.1.1 Index]