Learn R Programming

ClustOfVar (version 1.1)

plot.clustvar: Plot loadings in each cluster.

Description

Plot dotchart with the "loadings" of the variables in each cluster. The loading of a numerical variable is the correlation between this variables and the synthetic variable of its cluster. The loading of the level of a categorical variable is the mean value of the synthetic variable of the cluster on observations having this level.

Usage

# S3 method for clustvar
plot(x, ...)

Arguments

x

an object of class clustvar obtained with cutreevar or kmeansvar.

Further arguments to be passed to or from other methods. They are ignored in this function.

Value

coord.quanti

coordinates of quantitative variables belonging to cluster k on the synthetic variable associate to the same cluster k

coord.levels

coordinates of levels of categorical variables belonging to cluster k on the synthetic variable associate to the same cluster k

Examples

Run this code
# NOT RUN {
data(wine)
X.quanti <- PCAmixdata::splitmix(wine)$X.quanti
X.quali <- PCAmixdata::splitmix(wine)$X.quali
tree <- hclustvar(X.quanti,X.quali)
tree.cut<-cutreevar(tree,6)

#plot of scores on synthetic variables
res.plot <- plot(tree.cut)
res.plot$coord.quanti
res.plot$coord.levels
# }

Run the code above in your browser using DataLab