View source: R/BlockProjections.R
partialProj4CA | R Documentation |
partialProj4CA
computes blocks
(of columns or rows)
partial projections for a Correspondence Analysis (CA).
Blocks are non-overlapping sets of of columns or rows
of a data table analyzed with
CA (as performed with
epCA
from ExPosition
).
partialProj4CA
gives
the partial projection for the blocks.
These projections are barycentric
because the barycenters of the
partial projections are equal to the factor scores
for the whole table.
partialProj4CA(resCA, code4Blocks, rowBlocks = FALSE)
resCA |
the results of the (CA) analysis
from |
code4Blocks |
a vector indicating
which columns (or rows) belong
to what block (i.e.,
the of columns or rows of the same
block have the same level for
|
rowBlocks |
= |
In CA, the (barycentric) partial projections are obtained by rewriting the CA "reconstitution" formula (see Escofier, 1980; Abdi & Béra, 2018).
a list with (1) Fk
:
an I*L*K array of the partial projections
for the L
factors (from epCA
)
of the K blocks, for the I rows
(if rowBlock
is FALSE
for the J
columns if
rowBlock
is TRUE
);
(2) Ctrk
an I*L (resp. J*L)
matrix of the "relative"
block contributions [for a given component
the relative contributions sum to 1];
(3) absCtrk
an I*L (resp I*L)
matrix of the "absolute"
block contributions [for a given component
the absolute contributions sum to the eigenvalue
for this component];
(4) bk
a K*1 vector
storing the weights for the blocks,
(5) resRV
a list with
(a) a matrix storing the RV coefficients
between the blocks and, if the package
FactoMineR
is
installed, (b) the p-value for the
RV-coefficient
(as
computed with FactoMineR::coeffRV
).
Hervé Abdi
Escofier, B. (1980). Analyse factorielle de très grands tableaux par division en sous-tableaux. In Diday et al.: Data Analysis and Informatics. Amsterdam: North-Holland. pp 277-284.
Abdi H., & Béra, M. (2018). Correspondence analysis. In R. Alhajj and J. Rokne (Eds.), Encyclopedia of Social Networks and Mining (2nd Edition). New York: Springer Verlag.
## Not run: # Get the data/CA function from Exposition library(ExPosition) data(authors, package = 'ExPosition') X <- (authors$ca$data) # the data zeBlocks <- as.factor(c(1,1,2,2,3,3)) # 3 blocks resCA <- epCA(X, graphs = FALSE) # CA of X resPart <- partialProj4CA(resCA, zeBlocks, rowBlocks = TRUE) # partial factor scores are in \code{resPart} ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.