CA.SfromX: Compute the cross-product matrix for CA from a contingency...

View source: R/createCmat.R

CA.SfromXR Documentation

Compute the cross-product matrix for CA from a contingency table

Description

CA.SfromX computes the I*I row cross-product matrix S for CA from a I * J contingency table X. S is computed from the mean centered row profiles, with Abdi and Bera (2014, 2018) notation: S = M^1/2 * (R - c1') * W * (R - c1')' M^1/2. The eigen-decomposition of S gives the eigen-values of the CA of Xm the factor scores can aslo be obtained from the eigen vectors after an appropriate normalization. Columns with 0 sum are ignored.

Usage

CA.SfromX(X, center = TRUE)

Arguments

X

a data matrix with non-zero elements

center

= TRUE. if TRUE center the matrix. when center = FALSE, the first eigenvalue of S is equal to 1 and the first eigenvector is equal to r^(1/2), the other eigenvectors and eigenvalues are then the same are tose of the centered S.

Details

see Abdi and Bera, (2018) for details.

Value

S (the cross-product matrix)

Author(s)

Herve Abdi

References

Abdi H. & Bera, M. (in Press, 2018). Correspondence analysis. In R. Alhajj and J. Rokne (Eds.), Encyclopedia of Social Networks and Mining (2nd Edition). New York: Springer Verlag

Examples

## Not run: 
if(interactive()){
data(authors,package = 'ExPosition')
X <- as.matrix(authors$ca$data)
S <- CA.SfromX(X)
 }

## End(Not run)

HerveAbdi/PTCA4CATA documentation built on July 17, 2022, 5:41 a.m.