homog.test.Rd
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))
object of class MCA
, speMCA
, csMCA
, stMCA
or multiMCA
the categorical supplementary variable. It does not need to have been used at the MCA step.
the axes which are described. Default is c(1,2)
Returns a list of lists, one for each selected dimension in the MCA. Each list has 2 elements :
The square matrix of test statistics
The square matrix of p-values
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).
# 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 7.058897 8.008692
#> 25-49 7.058897 0.000000 1.200371
#> 50+ 8.008692 1.200371 0.000000
#>
#> $dim.1$p.values
#> 15-24 25-49 50+
#> 15-24 1.000000e+00 1.678213e-12 1.110223e-15
#> 25-49 1.678213e-12 1.000000e+00 2.299954e-01
#> 50+ 1.110223e-15 2.299954e-01 1.000000e+00
#>
#>
#> $dim.2
#> $dim.2$test.stat
#> 15-24 25-49 50+
#> 15-24 0.000000 8.772764 20.80055
#> 25-49 8.772764 0.000000 16.18387
#> 50+ 20.800554 16.183873 0.00000
#>
#> $dim.2$p.values
#> 15-24 25-49 50+
#> 15-24 1 0 0
#> 25-49 0 1 0
#> 50+ 0 0 1
#>
#>