genCA: Generalized Correspondence Analysis with choice of row and...

View source: R/CSCA.R

genCAR Documentation

Generalized Correspondence Analysis with choice of row and column metrics and choice of row and column centers

Description

genCA: Implements Generalized Correspondence Analysis with choice of row and column metrics and choice of row and column centers.

Usage

genCA(
  X,
  nfact = 3,
  normalize.X = TRUE,
  r.metric = NULL,
  c.metric = NULL,
  r.center = NULL,
  c.center = NULL
)

Arguments

X

an I by J data table suitable for correspondence analysis.

nfact

(Default: 3) number of factors to keep.

normalize.X

(Default: TRUE), when TRUE normalize X to a sum of 1 (as in standard CA).

r.metric

(Default: NULL), an eqnI by 1 vector of the row-metric. when NULL use the standard row-metric from CA i.e., the inverse of the sum of the rows of normalized X).

c.metric

(Default: NULL), a J by 1 vector of the columns-metric, when NULL use the standard column-metric from CA i.e., the inverse of the sum of the columns of normalized X).

r.center

(Default: NULL), an I by 1 vector of the row-center. when NULL use the standard row-center from CA i.e., the sum of the rows of normalized X).

c.center

(Default: NULL), a J by 1 vector of the row-center. when NULL use the standard column-center from CA i.e., the sum of the colums of normalized X).

Details

The current version is not optimized for computational efficiency and uses the general SVD function ExPosition::genPDQ().

Value

A list with 1) $fi: the row factor scores, 2) 2) $fj: the columns factor scores.

Author(s)

Herve Abdi

Examples

# Use the colorOfMusic Example from PTCA4CATA
data(colorOfMusic)
resCA <- genCA(colorOfMusic$contingencyTable)
# gives a standard CA of these data

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