eigCA: A bare-bone function to compute the eigen-values (and if...

View source: R/fastInferences4-eigen-CA.R

eigCAR Documentation

A bare-bone function to compute the eigen-values (and if asked row and column factor scores) of a matrix suitable for correspondence analysis.

Description

eigCA: A very fast and bare-bone function that computes the eigenvalues (and possibly the row and column factor scores) of the Correspondence Analysis (CA) of a data matrix suitable for CA (i.e., a matrix whose all entries are non-negative). eigCA is mainly used for cross-validation and resampling methods (e.g., permutation and bootstrap tests).

Usage

eigCA(Xdata, eig.only = TRUE)

Arguments

Xdata

a data matrix (whose all entries are non-negative) suitable for correspondence analysis.

eig.only

when TRUE (Default) compute only the CA- eigen-values of X. Otherwise compute also the row and column CA factor scores (i.e., fi and fj).

Details

As a fast bare-bones CA based computations eigCA is mainly used for cross-validation for CA methods.

Value

if eig.only is TRUE eigCA returns the CA-eigenvalues of X; if eig.only is FALSE eigCA returns a list with: $eigen: the CA-eigenvalues of X, $fi: the CA row factor scores, and $fi: the CA column factor scores.

Author(s)

Hervé Abdi

Examples

## Not run: 
set.seed(87) # set the seed
X <- matrix(round(runif(21)*20), ncol = 3) # good for CA
eigenOfX <- eigCA(X)

## End(Not run)

HerveAbdi/data4PCCAR documentation built on Sept. 11, 2022, 4:19 p.m.