Rsoc / soc.ca

Specific correspondence analysis in R
http://cran.r-project.org/web/packages/soc.ca/index.html
14 stars 1 forks source link

Variables(): The contribution of the modalities ordered by variable #71

Closed antongrau closed 12 years ago

antongrau commented 12 years ago

The contribution of the modalities to a certain dimension grouped by variable, within each variable the modalities are ordered by contribution and the variables are ordered by contribution. The contribution of each variable is summed.

This is done by printing several matrixes in the proper order, with the with of the longest matrix. This can be achieved by using lists!

First all modalites are grouped according to variable, and put into a matrix within a list. Each variable matrix is ordered according to ctr. Each matrix is added a row with the total contribution of the variable. This row is also put into a matrix in the same order as the variables in the list. With the help of order() we get the right order of presentation of the variables. And thus ordered by contribution