selvar: Selection of a given number of variables in each cluster.

Description Usage Arguments Details Value Examples

View source: R/selvar.R

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

1
selvar(part, nsel)

Arguments

part

an object of class clustvar

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

1
2
3
4
5
data(decathlon)
tree <- hclustvar(decathlon[,1:10])
part <- cutreevar(tree,4)
part$var
selvar(part,2) 

chavent/ClustOfVar documentation built on Nov. 7, 2019, 2:19 p.m.