From MCA results, computes a homogeneity test between categories of a supplementary variable, i.e. characterizes the homogeneity of several subclouds.

homog.test(resmca, var, dim = c(1,2))

Arguments

resmca

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

var

the categorical supplementary variable. It does not need to have been used at the MCA step.

dim

the axes which are described. Default is c(1,2)

Value

Returns a list of lists, one for each selected dimension in the MCA. Each list has 2 elements :

test.stat

The square matrix of test statistics

p.values

The square matrix of p-values

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)
# homogeneity test for variable Age
homog.test(mca, Music$Age)
#> $dim.1
#> $dim.1$test.stat
#>          15-24     25-49       50+
#> 15-24 0.000000 3.7253364 4.2265912
#> 25-49 3.725336 0.0000000 0.6334962
#> 50+   4.226591 0.6334962 0.0000000
#> 
#> $dim.1$p.values
#>              15-24        25-49          50+
#> 15-24 1.000000e+00 0.0001950549 2.372582e-05
#> 25-49 1.950549e-04 1.0000000000 5.264096e-01
#> 50+   2.372582e-05 0.5264096384 1.000000e+00
#> 
#> 
#> $dim.2
#> $dim.2$test.stat
#>          15-24    25-49      50+
#> 15-24 0.000000 4.096013 9.711800
#> 25-49 4.096013 0.000000 7.556267
#> 50+   9.711800 7.556267 0.000000
#> 
#> $dim.2$p.values
#>              15-24        25-49          50+
#> 15-24 1.000000e+00 4.203268e-05 0.000000e+00
#> 25-49 4.203268e-05 1.000000e+00 4.152234e-14
#> 50+   0.000000e+00 4.152234e-14 1.000000e+00
#> 
#>