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 x in cancor for a proper documentation.

Y

See y in cancor for a proper documentation.

Zx

(=NULL by default) covariates (i.e. nuisance) of X. If different from NULL, the X are residualized by Zx before entering cc(). IMPORTANT: if Zx is not NULL, include the intercept (if appropriate!)

Zy

(=Zx by default) covariates of Y. Same use of Zx.

numb_cc

number of (pairs of) canonical correlations to be extracted

fill.na

replace NA in X and Y with column mean before enter cc().

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)


[Package acca version 0.2 Index]