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

View source: R/selvar.R

selvarR 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 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

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

ClustOfVar documentation built on June 8, 2025, 11:17 a.m.