Learn R Programming

concor (version 1.0-0.1)

concorscano: "simultaneous concorgmcano"

Description

concorgmcano with the set of r solutions simultaneously optimized

Usage

concorscano(x,px,y,py,r)

Arguments

x
is a n x p matrix of p centered variables
y
is a n x q matrix of q centered variables
px
is a row vector which contains the numbers pi, i=1,...,kx, of the kx subsets xi of x : $\sum_i p_i$=sum(px)=p. px is the partition vector of x
py
is the partition vector of y with ky subsets yj, j=1,...,ky
r
is the wanted number of successive solutions rmax

Value

  • list with following components
  • cxis a n.kx x r matrix of kx row blocks cxi (n x r). Each row block contains r partial canonical components
  • cyis a n.ky x r matrix of ky row blocks cyj (n x r). Each row block contains r partial canonical components
  • rho2is a kx x ky x r array; for a fixed solution k, rho2[,,k] contains kxky squared correlations $\rho(cx[n*(i-1)+1:n*i,k],cy[n*(j-1)+1:n*j,k])^2$, simultaneously calculated between all the yj with all the xi

Details

This function uses the concors function

References

See svdbips

Examples

Run this code
x<-matrix(runif(50),10,5);y<-matrix(runif(90),10,9)
x<-scale(x);y<-scale(y)
cca<-concorscano(x,c(2,3),y,c(3,2,4),2)
diag(t(cca$cx[1:10,])%*%cca$cy[1:10,]/10)^2
cca$rho2[1,1,]

Run the code above in your browser using DataLab