cc {acca} | R Documentation |
cc
Description
Very similar cancor()
of package stats
, but 1) it allows for X and Y to be rank deficient, 2) it allows for categorical variables and 3) it allows for covariates, 4) more (see below).
Usage
cc(X, Y, Zx = NULL, Zy = Zx, numb_cc = NULL, fill.na = FALSE)
Arguments
X |
See |
Y |
See |
Zx |
( |
Zy |
( |
numb_cc |
number of (pairs of) canonical correlations to be extracted |
fill.na |
replace |
Value
It returns an acca
object. This object contains the same list as returned by cc
, while it also contains prop_expl_var
which is a list
reporting the proportion of explained (total) variance of X
and Y
by each component (i.e. mode).
L=matrix(rnorm(10),10,1) X=matrix(rnorm(50),10,5) Y=matrix(rnorm(70),10,7) Z=matrix(rnorm(20),10,2)
X[,1]=X[,1]+2*L Y[,1]=Y[,1]+2*L mod=cc(X,Y,Z) mod
ccbiplot(mod)