finalCCA: finalized CCA in seeded CCA

Description Usage Arguments Value Examples

View source: R/seedCCA.R

Description

Returns the results of the finalized step in seeded CCA.

Usage

1
finalCCA(X, Y)

Arguments

X

numeric matrix (n * d), the initially-CCAed first set of variables

Y

numeric matrix (n * d), the initially-CCAed second set of variables

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
########  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)

seedCCA documentation built on April 14, 2020, 7:14 p.m.

Related to finalCCA in seedCCA...