CAIV {CoCoAn} | R Documentation |
Multivariate analysis. This function perform correspondence analysis or constrained correspondence analysis. This latter is better known under the name of canonical correspondence analysis. This analysis finds coefficients of variables to obtain a row score of unit variance. This row score is used to compute by weighted averaging a column score of maximized variance.
CAIV(L, E=diag(1, dim(L)[1], dim(L)[1]), normE=TRUE)
L |
a (i,j) matrix of non-negative number |
E |
an (i,p) optional matrix of p external variables |
normE |
TRUE to normalize variables in matrix E ,
FALSE otherwise |
This function compute correspondence analysis (enter L
)
or constrained
correspondence analysis (enter L
and E
). The function return the
coefficient (B) to compute a row score of unit variance (R) that
maximize the between-column inertia (column score in F obtained by
weighting averaging). D contains the intra-set covariance (correlation
if normE=TRUE
). For correspondence analysis, CAIV(t(L))
gives a column
score of unit variance that maximize the between-rows inertia. Note that
this function does not use convenient rescaling and so is a little bit
different of ter Braak's CCA. (We use the algorithm of Chessel et al.)
A list with components
ev |
a vector containing eigenvalues |
B |
coefficients of variables of E (only in constrained analysis) |
D |
covariance matrix between external variables and row scores (only in constrained analysis) |
R |
row coordinates of unit variance |
F |
column coordinates of variance ev[i] |
Stephane DRAY dray@biomserv.univ-lyon1.fr
ter Braak (1986): Canonical correspondence analysis: a new eigenvector technique for multivariate direct gradient analysis. Ecology 67(5), 1167–1179.
Chessel, Lebreton and Yoccoz (1987): Propriétés de l'analyse canonique des correspondances; une illustration en hydrobiologie. Revue de Statistique Appliquée 35(4) 55–72.
##correspondence analysis L <- matrix(c(4,2,0,2,0,5,1,3,2,4,0,2,2,0,3,1),4,4) CAIV(L) CAIV(t(L)) ##canonical correspondence analysis E <-matrix(c(1.5,2.3,2,1.6,0.9,0.8,1.2,1.5),4,2) CAIV(L,E)