[Paper Review] ClustOfVar: An R Package for the Clustering of Variables
This paper introduces the R package ClustOfVar, which enables clustering of mixed-type variables (quantitative and qualitative) using a homogeneity criterion based on correlation ratios and squared correlations to a synthetic variable derived from PCAMIX. The method supports both hierarchical and k-means-type clustering, with stability assessment via bootstrap, offering a dimension reduction alternative to PCA that preserves interpretability and handles missing data through simple imputation.
Clustering of variables is as a way to arrange variables into homogeneous clusters, i.e., groups of variables which are strongly related to each other and thus bring the same information. These approaches can then be useful for dimension reduction and variable selection. Several specific methods have been developed for the clustering of numerical variables. However concerning qualitative variables or mixtures of quantitative and qualitative variables, far fewer methods have been proposed. The R package ClustOfVar was specifically developed for this purpose. The homogeneity criterion of a cluster is defined as the sum of correlation ratios (for qualitative variables) and squared correlations (for quantitative variables) to a synthetic quantitative variable, summarizing "as good as possible" the variables in the cluster. This synthetic variable is the first principal component obtained with the PCAMIX method. Two algorithms for the clustering of variables are proposed: iterative relocation algorithm and ascendant hierarchical clustering. We also propose a bootstrap approach in order to determine suitable numbers of clusters. We illustrate the methodologies and the associated package on small datasets.
Motivation & Objective
- To develop a unified R package for clustering variables of mixed types (quantitative and qualitative) where existing methods are limited.
- To address the lack of specialized R tools for variable clustering in mixed data, especially for qualitative or mixed variable sets.
- To provide a dimension reduction approach that replaces original data with synthetic variables from clusters, improving interpretability and reducing redundancy.
- To offer both hierarchical and k-means-type algorithms with stability evaluation via bootstrap to guide optimal cluster selection.
- To handle missing data through simple imputation (mean for quantitative, zero in indicator matrix for qualitative) while maintaining usability.
Proposed method
- The homogeneity of a cluster is measured by the sum of squared correlations (for quantitative variables) and correlation ratios (for qualitative variables) to a synthetic quantitative variable.
- The synthetic variable is defined as the first principal component from PCAMIX, a principal component method for mixed quantitative and qualitative data.
- Two algorithms are implemented: an iterative relocation k-means-type algorithm (kmeansvar) and an agglomerative hierarchical clustering algorithm (hclustvar).
- The algorithms maximize a homogeneity criterion that reflects how well variables in a cluster correlate with their cluster’s synthetic variable.
- Bootstrap resampling is used to assess cluster stability and guide the selection of the optimal number of clusters.
- Missing values are handled by replacing quantitative variables with their means and qualitative variables with zeros in the indicator matrix.
Experimental results
Research questions
- RQ1How can variable clustering be effectively applied to mixed-type data (quantitative and qualitative variables) in a way that preserves interpretability and redundancy detection?
- RQ2What are the relative performances of hierarchical and k-means-type clustering algorithms for variable clustering in mixed data settings?
- RQ3Can a synthetic variable derived from PCAMIX serve as a reliable and interpretable summary of a cluster of variables?
- RQ4How can the number of clusters be objectively determined in mixed data variable clustering?
- RQ5To what extent does the package handle missing data without compromising clustering quality?
Key findings
- The hierarchical clustering algorithm (hclustvar) achieved a higher homogeneity criterion (56.84) compared to the k-means-type algorithm (kmeansvar) with 10 random starts (51.02) on the wine dataset.
- In the wine dataset (n=21, p=31), the hierarchical method identified a cluster including 'Soil' (correlation ratio ≈ 0.78) and 'Odor.Intensity' (squared loading ≈ 0.76), indicating strong association with the synthetic variable.
- The synthetic variables from ClustOfVar’s clusters can be used as a quantitative replacement for the original mixed data matrix, enabling downstream analysis similar to PCA.
- The k-means-type algorithm (kmeansvar) is faster than hclustvar for large datasets, though it yields lower homogeneity on average.
- Bootstrap resampling was successfully used to assess stability and guide cluster number selection, supporting reliable interpretation.
- The package handles missing data via simple imputation, though performance may degrade with high missing data proportions, suggesting pre-processing with dedicated imputation packages is advisable.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.