`wcMCA.Rd`

Within-class MCA, also called conditional MCA

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

- 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)

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.

An object of class `speMCA`

, with an additional item :

- ratio
the within-class inertia percentage

.

The code is adapted from `speMCA`

function.

As in `speMCA`

, if there are NAs in `data`

, these NAs will be automatically considered as junk categories. If one desires more flexibility, `data`

should be recoded to add explicit factor levels for NAs and then `excl`

option may be used to select the junk categories.

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.)

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