selvar {ClustOfVar} | R Documentation |
Selection of a given number of variables in each cluster.
Description
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.
Usage
selvar(part, nsel)
Arguments
part |
an object of class |
nsel |
the number of variables selected in each cluster. |
Details
If the number of variables in a cluster is smaller than nsel
,
all the variables of the cluster are selected
Value
Returns a list where each element contains the nsel
selected variables.
Examples
data(decathlon)
tree <- hclustvar(decathlon[,1:10])
part <- cutreevar(tree,4)
part$var
selvar(part,2)
[Package ClustOfVar version 1.2 Index]