Learn R Programming

GDAtools (version 2.1)

coiMCA: Coinertia analysis between two groups of categorical variables

Description

Coinertia analysis between two groups of categorical variables

Usage

coiMCA(Xa, Xb, 
       excl.a = NULL, excl.b = NULL,
       row.w = NULL, ncp = 5)

Value

An object of class CA from FactoMineR package, with an additional item :

RV

the RV coefficient between the two groups of variabels

Arguments

Xa

data frame with the first group of categorical variables

Xb

data frame with the second group of categorical variables

excl.a

numeric vector indicating the indexes of the "junk" categories in Xa (default is NULL). See getindexcat or use ijunk interactive function to identify these indexes. It may also be a character vector of junk categories, specified in the form "namevariable.namecategory" (for instance "gender.male").

excl.b

numeric vector indicating the indexes of the "junk" categories in Xb (default is NULL). See excl.a argument.

row.w

numeric vector of row weights. If NULL (default), a vector of 1 for uniform row weights is used.

ncp

number of dimensions kept in the results (by default 5)

Author

Nicolas Robette

Details

Coinertia analysis aims at capturing the structure common to two groups of variables. With groups of numerical variables, it is equivalent to Tucker's inter-battery analysis. With categorical data, it consists in the following steps : 1. Transformation of Xa and Xb into indicator matrices (i.e. disjunctive tables) Xad and Xbd 2. Computation of the covariance matrix t(Xad).Xbd 3. CA of the matrix

References

Tucker, L.R.. (1958) An inter-battery method of factor analysis. Psychometrika, 23-2, 111-136.

Dolédec, S. and Chessel, D. (1994) Co-inertia analysis: an alternative method for studying species-environment relationships. Freshwater Biology, 31, 277–294.

See Also

coiPCA, rvcoef

Examples

Run this code
data(Music)
# music tastes
Xa <- Music[,1:5]
# gender and age
Xb <- Music[,6:7]
# coinertia analysis
res <- coiMCA(Xa, Xb)
plot(res)
# RV coefficient
res$RV

Run the code above in your browser using DataLab