Learn R Programming

GDAtools (version 2.1)

wcMCA: Within-class MCA

Description

Within-class MCA, also called conditional MCA

Usage

wcMCA(data, class, excl = NULL, row.w = NULL, ncp = 5)

Value

An object of class speMCA, with an additional item :

ratio

the within-class inertia percentage

.

Arguments

data

data frame with only categorical variables, i.e. factors

class

factor specifying the class

excl

numeric vector indicating the indexes of the "junk" categories (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").

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

Within-class Multiple Correspondence Analysis is a MCA where the active categories are centered on the mean of their class (i.e. conditional frequencies) instead of the overall mean (i.e. marginal frequencies).

It is also known as "conditional MCA" and can be seen as a special case of MCA on orthogonal instrumental variables, with only one (categorical) instrumental variable.

References

Escofier B., 1990, Analyse des correspondances multiples conditionnelle, La revue de Modulad, 5, 13-28.

Lebart L., Morineau A. et Warwick K., 1984, Multivariate Descriptive Statistical Analysis, John Wiley and sons, New-York.)

See Also

MCAoiv, wcPCA, PCAoiv

Examples

Run this code
# within-class analysis of tea data
# with SPC as class
library(FactoMineR)
data(tea)
res <- wcMCA(tea[,1:18], tea$SPC)
res$ratio
ggcloud_variables(res)

Run the code above in your browser using DataLab