Computes the cosines similarities and angles between the components of a CSA and those of a MCA.

angles.csa(rescsa, resmca)

Arguments

rescsa

object of class csMCA

resmca

object of class MCA or speMCA

Note

This function is adapted from csa.measures in sco.ca package.

Value

A list of matrices:

cosines

Cosine similarities

angles

Angles

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

See also

Examples

## Performs a specific MCA and a CSA on the Music example data set
## and computes cosine similarities and angles
data(Music)
junk <- c("FrenchPop.NA", "Rap.NA", "Rock.NA", "Jazz.NA", "Classical.NA")
resmca <- speMCA(Music[,1:5], excl = junk)
female <- Music$Gender=="Women"
rescsa <- csMCA(Music[,1:5], subcloud = female, excl = junk)
angles.csa(rescsa, resmca)
#> $cosines
#>          mca.dim1 mca.dim2 mca.dim3 mca.dim4 mca.dim5 mca.dim1&2 mca.dim1&3
#> csa.dim1   -0.991    0.121    0.064   -0.130    0.023      0.999      0.993
#> csa.dim2    0.103    0.390    0.872   -0.314    0.196      0.403      0.878
#> csa.dim3   -0.078   -0.809    0.459    0.398    0.090      0.813      0.465
#> csa.dim4   -0.029    0.422    0.088    0.850   -0.046      0.423      0.092
#> csa.dim5   -0.002   -0.015    0.134   -0.050   -0.975      0.015      0.134
#>          mca.dim1&4 mca.dim1&5 mca.dim2&3 mca.dim2&4 mca.dim2&5 mca.dim3&4
#> csa.dim1      1.000      0.991      0.137      0.178      0.123      0.145
#> csa.dim2      0.331      0.222      0.955      0.501      0.437      0.927
#> csa.dim3      0.406      0.120      0.930      0.902      0.814      0.607
#> csa.dim4      0.851      0.055      0.431      0.949      0.425      0.855
#> csa.dim5      0.050      0.975      0.135      0.052      0.975      0.143
#>          mca.dim3&5 mca.dim4&5
#> csa.dim1      0.068      0.132
#> csa.dim2      0.894      0.371
#> csa.dim3      0.467      0.408
#> csa.dim4      0.099      0.852
#> csa.dim5      0.984      0.976
#> 
#> $angles
#>          mca.dim1 mca.dim2 mca.dim3 mca.dim4 mca.dim5 mca.dim1&2 mca.dim1&3
#> csa.dim1      7.6     83.0     86.3     82.5     88.7        3.1        6.7
#> csa.dim2     84.1     67.0     29.3     71.7     78.7       66.2       28.6
#> csa.dim3     85.5     36.0     62.7     66.5     84.8       35.6       62.3
#> csa.dim4     88.4     65.0     85.0     31.7     87.3       65.0       84.7
#> csa.dim5     89.9     89.1     82.3     87.2     12.8       89.1       82.3
#>          mca.dim1&4 mca.dim1&5 mca.dim2&3 mca.dim2&4 mca.dim2&5 mca.dim3&4
#> csa.dim1        1.5        7.5       82.1       79.8       82.9       81.7
#> csa.dim2       70.7       77.2       17.3       59.9       64.1       22.1
#> csa.dim3       66.0       83.1       21.6       25.6       35.5       52.6
#> csa.dim4       31.7       86.9       64.4       18.3       64.9       31.3
#> csa.dim5       87.2       12.8       82.2       87.0       12.8       81.8
#>          mca.dim3&5 mca.dim4&5
#> csa.dim1       86.1       82.4
#> csa.dim2       26.7       68.2
#> csa.dim3       62.1       65.9
#> csa.dim4       84.3       31.6
#> csa.dim5       10.2       12.5
#>