selvar | R Documentation |
This function selects in each cluster a given number of variables having the highest squared loadings. The squared loading of a variable in a cluster is its squared correlation (for numerical variable) and its correlation ratio (for categorical variable) with the first PC of PCAmix applied to the variables of the cluster.
selvar(part, nsel)
part |
an object of class |
nsel |
the number of variables selected in each cluster. |
If the number of variables in a cluster is smaller than nsel
,
all the variables of the cluster are selected
Returns a list where each element contains the nsel
selected variables.
data(decathlon)
tree <- hclustvar(decathlon[,1:10])
part <- cutreevar(tree,4)
part$var
selvar(part,2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.