From MCA results, computes statistics (weights, coordinates, squared cosines, contributions, test-values, variances) for categorical supplementary variables.

supvars(resmca, vars)

varsups(resmca, vars)

Arguments

resmca

object of class MCA, speMCA, csMCA, stMCA or multiMCA

vars

A data frame of categorical supplementary variables. All these variables should be factors.

Value

Returns a list with the following items :

weight

numeric vector of categories weights

coord

data frame of categories coordinates

cos2

data frame of categories squared cosines

var

a list of data frames of categories within variances, variance between and within categories and variable square correlation ratio (eta2)

typic

data frame of categories typicality test statistics

pval

data frame of categories p-values from typicality test statistics

cor

data frame of categories correlation coefficients

Note

varsups is softly deprecated. Please use supvars instead.

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)
# computes statistics for Gender and Age supplementary variables
supvars(mca, Music[, c("Gender","Age")])
#> $weight
#>   Gender.Men Gender.Women    Age.15-24    Age.25-49      Age.50+ 
#>          253          247           78          204          218 
#> 
#> $coord
#>                  dim.1     dim.2     dim.3     dim.4     dim.5
#> Gender.Men    0.002461 -0.095251 -0.044400 -0.011305  0.014944
#> Gender.Women -0.002521  0.097565  0.045478  0.011579 -0.015307
#> Age.15-24     0.445924 -0.781930 -0.313437 -0.002163  0.105164
#> Age.25-49    -0.050511 -0.236099  0.105504  0.102956  0.003924
#> Age.50+      -0.112283  0.500710  0.013419 -0.095570 -0.041299
#> 
#> $cos2
#>                 dim.1    dim.2    dim.3    dim.4    dim.5
#> Gender.Men   0.000006 0.009293 0.002019 0.000131 0.000229
#> Gender.Women 0.000006 0.009293 0.002019 0.000131 0.000229
#> Age.15-24    0.036754 0.113010 0.018159 0.000001 0.002044
#> Age.25-49    0.001758 0.038417 0.007671 0.007305 0.000011
#> Age.50+      0.009746 0.193811 0.000139 0.007061 0.001319
#> 
#> $var
#> $var$Gender
#>            dim.1    dim.2    dim.3    dim.4    dim.5
#> Men     0.290292 0.244867 0.207113 0.178409 0.129570
#> Women   0.266459 0.186373 0.198275 0.164282 0.128262
#> within  0.278519 0.215971 0.202747 0.171430 0.128924
#> between 0.000002 0.002026 0.000410 0.000022 0.000029
#> total   0.278521 0.217997 0.203157 0.171452 0.128953
#> eta2    0.000006 0.009293 0.002019 0.000131 0.000229
#> 
#> $var$Age
#>            dim.1    dim.2    dim.3    dim.4    dim.5
#> 15-24   0.224468 0.162922 0.216555 0.333632 0.080558
#> 25-49   0.299116 0.241927 0.199184 0.195215 0.123800
#> 50+     0.254595 0.101594 0.192788 0.087921 0.150360
#> within  0.268060 0.168417 0.199105 0.170028 0.128634
#> between 0.010461 0.049580 0.004052 0.001424 0.000319
#> total   0.278521 0.217997 0.203157 0.171452 0.128953
#> eta2    0.037558 0.227433 0.019946 0.008308 0.002475
#> 
#> 
#> $typic
#>                  dim.1     dim.2     dim.3     dim.4     dim.5
#> Gender.Men    0.055648 -2.153442 -1.003786 -0.255574  0.337862
#> Gender.Women -0.055648  2.153442  1.003786  0.255574 -0.337862
#> Age.15-24     4.282548 -7.509471 -3.010171 -0.020778  1.009972
#> Age.25-49    -0.936718 -4.378377  1.956531  1.909278  0.072764
#> Age.50+      -2.205306  9.834220  0.263555 -1.877042 -0.811141
#> 
#> $pval
#>                 dim.1    dim.2    dim.3    dim.4    dim.5
#> Gender.Men   0.955622 0.031284 0.315482 0.798279 0.735467
#> Gender.Women 0.955622 0.031284 0.315482 0.798279 0.735467
#> Age.15-24    0.000018 0.000000 0.002611 0.983423 0.312509
#> Age.25-49    0.348903 0.000012 0.050403 0.056226 0.941994
#> Age.50+      0.027433 0.000000 0.792123 0.060512 0.417285
#> 
#> $cor
#>               dim.1  dim.2  dim.3  dim.4  dim.5
#> Gender.Men    0.002 -0.096 -0.045 -0.011  0.015
#> Gender.Women -0.002  0.096  0.045  0.011 -0.015
#> Age.15-24     0.192 -0.336 -0.135 -0.001  0.045
#> Age.25-49    -0.042 -0.196  0.088  0.085  0.003
#> Age.50+      -0.099  0.440  0.012 -0.084 -0.036
#>