finalCCA | R Documentation |
Returns the results of the finalized step in seeded CCA.
finalCCA(X, Y)
X |
numeric matrix (n * d), the initially-CCAed first set of variables |
Y |
numeric matrix (n * d), the initially-CCAed second set of variables |
cor |
canonical correlations in finalized step |
xcoef |
the estimated canonical coefficient matrix of the initially-CCAed first set of variables |
ycoef |
the estimated canonical coefficient matrix of the initially-CCAed second set of variables |
Xscores |
the finalized canonical variates of the first set of variables |
Yscores |
the finalized canonical variates of the second set of variables |
######## data(cookie) ######## data(cookie) myseq <- seq(141, 651, by=2) X <- as.matrix(cookie[-c(23,61), myseq]) Y <- as.matrix(cookie[-c(23,61), 701:704]) min.pr <- min( dim(X)[2], dim(Y)[2]) MX0 <- iniCCA(X, Y, u=4, num.d=min.pr) ini.X <- X %*% MX0 finalCCA(ini.X, Y) ######## data(nutrimouse) ######## data(nutrimouse) Y<-as.matrix(nutrimouse$lipid) X<-as.matrix(nutrimouse$gene) MX0 <- iniCCA(X, Y, u=4, num.d=4) MY0 <- iniCCA(Y, X, u=5, num.d=4) ini.X <- X %*% MX0 ini.Y <- Y %*% MY0 finalCCA(ini.X, ini.Y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.