This function is modified from original CCA function for two reasons: to deal with only positive eigenvalues larger than the tolerance when calculating the inverse of the matrices and to compute Singular Value Decomposition using irlba
algorithm. Inputs should be correlation or covariance matrices of each data set and between datasets. This function returns only the first pair of canonical covariates.
standardCCA(S1, S2, S12, tol = 1e-04)
standardCCA
returns a data.frame containing
cancor: estimated canonical correlation.
w1: estimated canonical direction \(w1\).
w2: estimated canonical direction \(w2\).
correlation/covariance matrix of dataset X1
.
correlation/covariance matrix of dataset X2
.
correlation/covariance matrix between dataset X1
and dataset X2
.
tolerance for eigenvalues. standardCCA
function only deals with positive eigenvalues larger than the tolerance.