Identifies the categories that contribute the most to a given dimension of a Multiple Correspondence Analysis and organizes these informations into a fancy table.

tabcontrib(resmca, dim = 1, best = TRUE, dec = 2, shortlabs = FALSE)

Arguments

resmca

object of class MCA, speMCA, or csMCA

dim

dimension to describe (default is 1st dimension)

best

if FALSE, displays all the categories; if TRUE (default), displays only categories with contributions higher than average

dec

integer. The number of decimals for the results (default is 2)

shortlabs

logical. If TRUE, the data frame will have short column names, so that all columns can be displayed side by side on a laptop screen. Default is FALSE (long explicit column names).

Value

A data frame with the following contributions.:

Variable

names of the variables

Category

names of the categories

Weight

weights of the categories

Quality of representation

quality of representation (squared cosine) of the categories on the axis

Contribution (left)

contributions of the categories located on one side of the axis

Contribution (right)

contributions of the categories located on the other side of the axis

Total contribution

contributions summed by variable

Cumulated contribution

cumulated sum of the contributions

Contribution of deviation

for each variable, contribution of the deviation between the barycenter of the categories located on one side of the axis and the barycenter of those located on the other side

Proportion to variable

contribution of deviation expressed as a proportion of the contribution of the variable

References

Le Roux B. and Rouanet H., Multiple Correspondence Analysis, SAGE, Series: Quantitative Applications in the Social Sciences, Volume 163, CA:Thousand Oaks (2010).

Le Roux B. and Rouanet H., Geometric Data Analysis: From Correspondence Analysis to Stuctured Data Analysis, Kluwer Academic Publishers, Dordrecht (June 2004).

Author

Nicolas Robette

Examples

# specific MCA of Music example data set
data(Music)
junk <- c("FrenchPop.NA", "Rap.NA", "Rock.NA", "Jazz.NA", "Classical.NA")
mca <- speMCA(Music[,1:5], excl = junk)
# main contributions on axis 1
tabcontrib(mca, 1)
#>    Variable Category Weight Quality of representation Contribution (left)
#> 2 Classical      Yes    142                     0.539               27.72
#> 1                 No    351                     0.505                    
#> 3      Jazz      Yes     95                     0.608               35.34
#>   Contribution (right) Total contribution Cumulated contribution
#> 2                                   38.52                  38.52
#> 1                 10.8                                          
#> 3                                   35.34                  73.87
#>   Contribution of deviation Proportion to variable
#> 2                     38.52                  99.99
#> 1                                                 
#> 3                     35.34                  80.59
# main contributions on axis 2
tabcontrib(mca, 2)
#>   Variable Category Weight Quality of representation Contribution (left)
#> 3     Rock      Yes    135                     0.456               30.57
#> 2                No    360                     0.435                    
#> 1      Rap      Yes     77                     0.525               40.74
#>   Contribution (right) Total contribution Cumulated contribution
#> 3                                   41.76                  41.76
#> 2                11.19                                          
#> 1                                   40.74                  82.49
#>   Contribution of deviation Proportion to variable
#> 3                     41.75                    100
#> 2                                                 
#> 1                     40.74                  84.35